C.14 GitInitTask
Prev | Appendix C. Optional tasks | Next

## C.14 GitInitTask

Create an empty git repository or reinitialize an existing one.

Table C.15: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`gitPath` | `String` | Path to Git binary | /usr/bin/git | No
`repository` | `String` | Path to Git repository | n/a | Yes
`bare` | `Boolean` | Create bare repository. See --bare option of git-init. | `false` | No

### C.14.1 Example

    <property name="repo.dir" value="./relative/path/to/repo" />
    <resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />

    <!-- Initialize normal repository -->
    <gitinit repository="${repo.dir.resolved}" />

    <!-- Initialize bare repository -->
    <gitinit bare="true" repository="${repo.dir.resolved}" />

Prev | Up | Next
C.13 FtpDeployTask | Home | C.15 GitCloneTask