问题:
I'd like to move the last several commits I've committed to master to a new branch and take master back to before those commits were made. 我想将我已承诺掌握的最后几个提交移动到新的分支,并在做出这些提交之前将master重新带回去。 Unfortunately, my Git-fu is not strong enough yet, any help? 不幸的是,我的Git-fu还不够坚固,有什么帮助吗?
Ie How can I go from this 即我该如何去
master A - B - C - D - E
to this? 对此吗?
newbranch C - D - E
/
master A - B
解决方案:
参考一: https://stackoom.com/question/6pf9/使用Git将最新提交移至新分支参考二: https://oldbug.net/q/6pf9/Move-the-most-recent-commit-s-to-a-new-branch-with-Git
来源:oschina
链接:https://my.oschina.net/u/3797416/blog/3209385