🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# C.21 GitInitTask Create an empty git repository or reinitialize an existing one. Table C.22:聽Attributes NameTypeDescriptionDefaultRequired`gitPath``String`Path to Git binary/usr/bin/gitNo`repository``String`Path to Git repositoryn/aYes`bare``Boolean`Create bare repository. See --bare option of [git-init](http://www.kernel.org/pub/software/scm/git/docs/git-init.html).`false`No C.21.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}" /> ```