要将开发分支合并到VSTS发布环境中的主分支中,可以通过添加
PowerShell任务
. 详情如下:
使用脚本添加PowerShell任务:
git clone https://username:password@github.com/username/repo repo
cd repo
git checkout development
git checkout master
git merge development
git push origin master
注:
-
应在PowerShell任务中取消选择“标准错误失败”选项。
-
如果合并期间发生合并冲突,PowerShell任务将失败。
development
分支到
master
分支。所以你最好加上
-X
选择
git merge
命令:
git merge development -X theirs #Resolve the merge conflict files by keeping the version on development branch
git merge development -X ours #Resolve the merge conflict files by keeping the version on master branch