How can I merge many commits, but leave one out?

前端 未结 5 636
醉话见心
醉话见心 2020-12-07 19:37

Suppose I have this feature branch \"foo\". Now I want to merge it back into master, but I\'ve added some debugging code that I don\'t want in master.

The debug cod

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-07 20:16

    I've had success with:

    git rebase -p --onto SHA^ SHA
    

    Where SHA is the commit you want to remove.

    via http://sethrobertson.github.io/GitFixUm/fixup.html#remove_deep

提交回复
热议问题