Git

Git insert a cherry-pick

2021-06-08  本文已影响0人  JaedenKil

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
上一篇 下一篇

猜你喜欢

热点阅读