我有包含这些提交的分支主文件:
C1
C2
C3
然后我从master中创建了包含那些提交的分支B1
B1
B2
B3
如何将现在的B1放在master的头部并保留所有提交:
C1
C2
C3
B1
B2
B3
答案 0 :(得分:0)
我认为这会做你想要的......
# Make sure you have the lastest master
git fetch
git checkout master
git rebase origin/master
# Make sure B1 sits atop the lastest master
git checkout B1
git rebase master
# (Fast-forward) Merge back to master
git checkout master
git merge B1
答案 1 :(得分:0)
git checkout master
git merge B-branch
//解决冲突