这是我的情况
master commit1 commit2 develop commit3 commit4 fix
我想创建从master派生的新分支,并添加commit3和commit4。
我试过了:
git checkout master
git checkout -b master1
git rebase --onto master develop master1
但没有成功
答案 0 :(得分:0)
回到上一个已知的良好版本的master(例如6个提交前):
git reset HEAD~6
创建一个新分支:
git checkout -b newmaster
坚持良好的承诺:
git cherry-pick commit3
git cherry-pick commit4