Re: [PATCH 2/7] [doc] git-merge: link to new merge conflicts guide
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 25, 2026, 18:19 UTC
- Message-ID
- <xmqqld8purb8.fsf@gitster.g>
- In-Reply-To
- <2f71028f-d58e-400f-a02e-7a25c032d889@app.fastmail.com>
"Julia Evans" <julia@jvns.ca> writes:
> Thanks, I meant to flag this: the reason I deleted it was really > just that I couldn't understand what `git log --merge -p <path>` did > from the documentation and so I removed it until I could figure it out.
It looks at the index to figure out which paths we got conflicts on, and then does "git log -p <those> <conflicted> <paths>". You can give a pathspec from the command line to further limit the output.
>> `git log --merge -p <filename>` will print out all commits which >> caused the merge conflict for `<filename>`, and the diff >> of how they changed the file.
If you _know_ which exact single file you are interested in, there is not much you gain from the "--merge" option. "--left-right" option may be a lot more useful there. It let's you see which side of the merge gave you what changes.