How do I rebase while skipping a particular commit?
问题 Is there a way to rebase a branch onto another while skipping a particular (conflicting) commit on the other branch? For example, I want to rebase mybranch onto master , but master contains a commit that will conflict with the commits in master, so I prefer to undo that commit completely. -o-o-o-o-o-x-o-o-o-o master | o-o-o-o mybranch x marks the conflicting commit. 回答1: Use interactive rebase: git rebase -i master An editor will open and you will have a list of commits like this: pick