C.18 GitInitTask

Create an empty git repository or reinitialize an existing one.

Table C.19: 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.18.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}" />