在不同的分支上重放最后的N个git提交 [英] Replay the last N git commits on a different branch
本文介绍了在不同的分支上重放最后的N个git提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
?
I accidentally made 10 commits on branch "testing" when I intended to commit them on branch "master". The other commits on the "testing" branch are garbage, so I don't want to merge it with "master". Instead, I just want to replay the last 10 commits on master.
解决方案
- git checkout master
- git whatchanged testing
- git cherry-pick _________
?
这篇关于在不同的分支上重放最后的N个git提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文