Can't resolve rebase conflict

You are on the right path. You just need to use skip the commit on which you have problems:

git rebase --skip

You have fixed the conflict, but this has resulted in no changes compared to the previous commit. In this case you cannot just git rebase --continue, because you are telling Git to create an empty commit, which is not allowed.

If you have conflicts for any other commits you should still use git rebase --continue.

The --skip option is also useful when you don't want to include certain commit at all in the newly produced history.


git rebase --skip is indeed the right solution, except there is a case where it would get stuck and wouldn't be able to go on with the current rebase.

Git 2.0.2 (July 2014) has fixed that bug: see commit 95104c7 by brian m. carlson (bk2204):

rebase--merge: fix --skip with two conflicts in a row

If git rebase --merge encountered a conflict, --skip would not work if the next commit also conflicted.
The msgnum file would never be updated with the new patch number, so no patch would actually be skipped, resulting in an inescapable loop.

Update the msgnum file's value as the first thing in call_merge.
This also avoids an "Already applied" message when skipping a commit.
There is no visible change for the other contexts in which call_merge is invoked, as the msgnum file's value remains unchanged in those situations.