<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}" /> <!-- Create branch "sample-branch" tracking current HEAD --> <gitbranch repository="${repo.dir.resolved}" branchname="sample-branch" /> <!-- Create branch "sample-branch" tracking origin/master Note that you can omit both startpoint and track attributes in this case --> <gitbranch repository="${repo.dir.resolved}" branchname="sample-branch" startpoint="origin/master" track="true" /> <!-- Delete fully merged branch "sample-branch" --> <gitbranch repository="${repo.dir.resolved}" branchname="sample-branch" delete="true" /> <!-- Force delete even unmerged branch "sample-branch" --> <gitbranch repository="${repo.dir.resolved}" branchname="sample-branch" forcedelete="true" /> <!-- Renabe "branch1" to "branch2" --> <gitbranch repository="${repo.dir.resolved}" branchname="branch1" newbranch="branch2" move="true" />