美文网首页Git
Git insert a cherry-pick

Git insert a cherry-pick

作者: JaedenKil | 来源:发表于2021-06-08 19:07 被阅读0次

Say I have commits A - B - C, "C" is the newest commit.
I need to run cherry-pick a "X" commit, and insert the commit between "B" & "C".

  1. Rebase
git rebase -i hashValueForA
  1. Edit
    In the pop-up message, change "pick" to "e" for "B".
  2. Cherry-pick
git cherry-pick hashValueForX
  1. Rebase
git rebase --continue
  1. Push
git push -f // If needed, and be careful about this step

相关文章

网友评论

    本文标题:Git insert a cherry-pick

    本文链接:https://www.haomeiwen.com/subject/abgzsltx.html