Given the following (slightly contrived) situation - 3 commits with their commit messages, where I'm 2 commits ahead of my origin/master and want to rebase:
C1 <-- origin/master
first commit
* Implement the foo
C2
second commit
* Wibble the foo
* This is temporary to workaround the issue with the thingy, and can be removed after Steve applies his fix.
C3 <-- HEAD
third commit
* Add the wotsit
With C3
checked-out, I do: git rebase origin/master
, and let's say there's a conflict, so I see something like:
First, rewinding head to replay your work on top of it...
Applying: second commit
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging foo.txt
CONFLICT (add/add): Merge conflict in foo.txt
error: Failed to merge in the changes.
Patch failed at 0001 C2
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
At this point, git log
will show me all the commits prior to the one that caused the conflict, up to C1:
$ git log
commit C1
Author: Me
Date: Thu Oct 26 16:12:53 2017 +0100
first commit
* Implement the foo
commit C0
Author: Someone else
Date: Wed Oct 25 ...
etc...
To help give me context about which commit it is that I'm currently looking at, I'd like to see the full message for the commit that I'm currently rebasing.
In this case that's the message for commit C2, which reminds me that I can safely git rebase --skip
this commit, as my change was a temporary workaround that I want to throw away anyway.
The message telling you about the conflict only gives the first line of the message "second commit", not the body with the useful bullet points.
Is that possible? I can see that it might be weird because, at the point where I'm in the middle of the rebase, the commit doesn't really exist yet, but equally the message must exist somewhere, because when I resolve the conflict and do git rebase --continue
, the original commit message will be applied.