💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# C.19 GitFetchTask Download objects and refs from another repository. See official [documentation](http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html). Table C.20:聽Attributes NameTypeDescriptionDefaultRequired`gitPath``String`Path to Git binary./usr/bin/gitNo`repository``String`Path to Git repository.n/aYes`source``String`The "remote" repository that is the source of a fetch or pull operation. See <repository> in [git-fetch](http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html).originNo`refspec``String`See <refspec> in [git-fetch](http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html).聽No`group``String`A name referring to a list of repositories as the value of remotes.<group> in the configuration file. See <group> in [git-fetch](http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html).聽No`quiet``Boolean`Silence any internally used git commands. Progress is not reported to the standard error stream. See --quiet in [git-fetch](http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html).`false`No`all``Boolean`Fetch all remotes. See --all in [git-fetch](http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html).`false`No`keep``Boolean`Keep downloaded pack. See --keep in [git-fetch](http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html).`false`No`prune``Boolean`After fetching, remove any remote tracking branches which no longer exist on the remote. See --prune in [git-fetch](http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html).`false`No`tags``Boolean`See --tags in [git-fetch](http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html).`false`No`notags``Boolean`See --no-tags in [git-fetch](http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html).`false`No`force``Boolean`When git fetch is used with <rbranch>:<lbranch> refspec, it refuses to update the local branch <lbranch> unless the remote branch <rbranch> it fetches is a descendant of <lbranch>. This option overrides that check. See --force in [git-fetch](http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html).`false`No C.19.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}" /> <!-- Fetch objects from all remotes --> <gitfetch repository="${repo.dir.resolved}" all="true" /> <!-- Fetch from origin/master to "refspec-branch" local branch --> <gitfetch repository="${repo.dir.resolved}" source="origin" refspec="master:refspec-branch" quiet="true" /> ```