0

After a long, complicated rebase involving merge conflicts and the like, it would be nice to have a look at the accepted changes all at once.

Kay V
  • 3,738
  • 2
  • 20
  • 20

1 Answers1

0

Turns out there's a succinct answer: git diff REBASE_HEAD

This answer is particularly good to have on hand, since it parallels the command for reverting to the pre-rebase version of your repo: git reset --hard REBASE_HEAD

I stumbled on this answer as I was writing my question. I'm adding the question all the same, so I can refer back to it in the future (and in case it's useful to someone else, of course).

Kay V
  • 3,738
  • 2
  • 20
  • 20
  • `git reset --hard REBASE_HEAD` doesn't reset to a pre-rebase version of the repo, since after a rebase completes, the `REBASE_HEAD` name is removed. As you're performing your rebase, the commit `REBASE_HEAD` points to changes as well. See `reflog` to find the actual pre-rebase commit ID. – amphetamachine Feb 08 '23 at 05:54
  • Thanks for comment, @amphetamachine - I used it moments ago, and have used it previously. It seems to work even after `git rebase --complete`. I had found the suggestion here a while back: https://stackoverflow.com/a/692763/5440638 tho I have never been able to find anything supporting it in git documentation, interestingly. – Kay V Feb 08 '23 at 06:08