C.20 GitInitTask

Create an empty git repository or reinitialize an existing one.

Table C.21: Attributes

NameTypeDescriptionDefaultRequired
gitPathStringPath to Git binary/usr/bin/gitNo
repositoryStringPath to Git repositoryn/aYes
bareBooleanCreate bare repository. See --bare option of git-init.falseNo

C.20.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}" />