git rebase --continue won't work

If you are in Mac OS X, then first of all you should disable revisiond, as it can mess with files in your work tree in the middle of rebase, causing unpredictable and broken behavior:

git config --global core.trustctime false

The issue is explained in this article, and big thanks to @nickfalk who pointed it out.

As for your rebase, this kind of situation is not unusual in practice. Let's try to think through the steps of what's happening:

  • When you rebase the current branch on top of another branch, git moves the HEAD to the other branch, and starts applying the unique commits you have in your current branch.

  • While replaying one of those commits, you reached a conflict. You resolved it, but as a result there are no changes to commit, nothing to replay in this commit.

Practically, this means that you rejected the changes in the current commit being replayed. So, if you don't need anything from this commit, it's normal to skip it. So git rebase --skip makes sense here.


Breath, you're not going crazy! ;-= This is a known bug where OSX (if that is indeed what you're using) is messing with git, it is detailed here (not by me).

Short story (i.e. the fix) is:

git config --global core.trustctime false

I had a similar problem in my project and solved by putting the --preserve-merges option to the rebase command. In my project, this problem was caused by a merge commit, which is an "empty commit". Using git rebase --preserve-merges it takes the merge commit and continues the merge without breaking the commit tree.

Tags:

Git

Git Rebase