1

I've never seen this before, and I have no idea what's happening. I'm trying to rebase commits on a branch interactively.

git rebase -i

pick caa159b feat: user page
pick 3ca1c9d feat: profile page
pick 26230ec fix: user page fix

==>

pick caa159b feat: user page
squash 3ca1c9d fix: user page fix
pick 26230ec feat: profile page

But when I run it, I'm getting this error which I've never seen before.

The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

    git commit --allow-empty

Otherwise, please use 'git cherry-pick --skip'
interactive rebase in progress; onto dc2c1aa
Last command done (1 command done):
   pick caa159b feat: user page
Next commands to do (2 remaining commands):
   squash 26230ec fix: user page
   pick 3ca1c9d feat: profile page
You are currently rebasing branch 'staging' on 'dc2c1aa'.

Can someone explain what's going on here? There is no conflict from what I can tell.

fny
  • 31,255
  • 16
  • 96
  • 127
  • 1
    Does this answer your question? [What does "possibly due to conflict resolution" mean in the empty cherry-pick message?](https://stackoverflow.com/questions/42139028/what-does-possibly-due-to-conflict-resolution-mean-in-the-empty-cherry-pick-me) – Ulrich Eckhardt Jan 08 '21 at 21:40
  • Is this repeatable? If you abort and try again does it happen again? – TTT Jan 08 '21 at 22:37
  • @UlrichEckhardt No that doesn't answer my question. None of those cases apply. @TTT This happens every time. `git reset HEAD~` then `git rebase -i`. I make those changes, then I see that error. – fny Jan 09 '21 at 02:04
  • @fny I asked because the bottom output has the squash and pick IDs swapped, which looks like maybe you had them out of order somehow. – TTT Jan 09 '21 at 02:14
  • 1
    What is the purpose of this command: `git reset HEAD~` before the interactive rebase? – TTT Jan 09 '21 at 02:35
  • Sorry, I undo the last mega commit recommit smaller commits, and then rebase to clean up. Interestingly, everything appears to work from Sourcetree but not the command line. – fny Jan 13 '21 at 13:53
  • What do those two commits that you're squashing together do? Can you provide a [mcve]? What is the difference between the current base and the new base? There are many ways you can end up with an empty commit and they are not generally errors. – Ulrich Eckhardt Jan 14 '21 at 07:38

0 Answers0