🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# C.23 GitMergeTask Join two or more development histories together. See official [documentation](http://www.kernel.org/pub/software/scm/git/docs/git-merge.html). Table C.24:聽Attributes NameTypeDescriptionDefaultRequired`gitPath``String`Path to Git binary/usr/bin/gitNo`repository``String`Path to Git repositoryn/aYes`remote``String`Space separated list of branches to merge into current HEAD. See <commit> in [git-merge](http://www.kernel.org/pub/software/scm/git/docs/git-merge.html).n/aNo`message``String`Commit message to be used for the merge commit (in case one is created). See <msg> in [git-merge](http://www.kernel.org/pub/software/scm/git/docs/git-merge.html).n/aNo`fastForwardCommit``Boolean`If set false (default), will not generate a merge commit if the merge resolved as a fast-forward, only update the branch pointer. If set true, will generate a merge commit even if the merge resolved as a fast-forward. See --ff/--no-ff options in [git-merge](http://www.kernel.org/pub/software/scm/git/docs/git-merge.html).`false`No`strategy``String`Merge strategy. One of "resolve", "recursive", "octopus", "ours", or "subtree". See <strategy> in [git-merge](http://www.kernel.org/pub/software/scm/git/docs/git-merge.html).n/aNo`strategyOption``String`Pass merge strategy specific option through to the merge strategy. See <strategy-option> in [git-merge](http://www.kernel.org/pub/software/scm/git/docs/git-merge.html).n/aNo`commit``Boolean`See --commit in [git-merge](http://www.kernel.org/pub/software/scm/git/docs/git-merge.html).`false`No`nocommit``Boolean`See --no-commit in [git-merge](http://www.kernel.org/pub/software/scm/git/docs/git-merge.html).`false`No`quiet``Boolean`Quiet, suppress feedback messages. See --quiet in [git-merge](http://www.kernel.org/pub/software/scm/git/docs/git-merge.html).`false`No C.23.1 Example ``` <property name="repo.dir" value="./relative/path/to/repo" /> <resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" /> <!-- clone repository --> <gitclone repository="git://github.com/path/to/repo/repo.git" targetPath="${repo.dir.resolved}" /> <!-- create couple of test branches --> <gitbranch repository="${repo.dir.resolved}" branchname="merge-test-1" startpoint="origin/master" /> <gitbranch repository="${repo.dir.resolved}" branchname="merge-test-2" startpoint="origin/master" /> <!-- Merge those branches back into master --> <gitmerge repository="${repo.dir.resolved}" remote="merge-test-1 merge-test-2" message="merging repos" commit="true" /> ```