我正在尝试将我的分支任务-5与dev分支合并,但它无法自动合并。有冲突,我修复了它,然后我把它提交到分支任务-5但我仍然不能合并。
我应该如何将task-5合并到dev分支中?感谢
答案 0 :(得分:1)
请尝试以下步骤:
git checkout task-5
git pull --rebase origin dev
#if everything is ok
git push origin HEAD:dev
如果不起作用,请再试一次:
git fetch origin dev
git checkout -b my_dev FETCH_HEAD
git cherry my_dev task-5
#you will get a list of '+ sha1'. Ignore the '- sha1' lines.
#Suppose we get 3 sha1's, 1234567,2345678, and 3456789.
git cherry-pick 1234567
git cherry-pick 2345678
git cherry-pick 3456789
#if there is any conflict, fix it
git add .;git cherry-pick --continue
#fi
git pull --rebase origin dev
git push origin HEAD:dev