Re: [PATCH 2/7] [doc] git-merge: link to new merge conflicts guide
flat view
From: Julia Evans <hidden>
Date: 2026-09-25 16:59:59
On Fri, Sep 25, 2026, at 12:36 PM, D. Ben Knoble wrote:
Hi Julia, On Thu, Sep 24, 2026 at 10:46 AM Julia Evans via GitGitGadget [off-list ref] wrote:quoted
From: Julia Evans <redacted> All of the info about merge conflicts has been moved to the new guidequoted
Among the changes made to the common ancestor's version, -non-overlapping ones (that is, you changed an area of the file while the -other side left that area intact, or vice versa) are incorporated in the -final result verbatim. When both sides made changes to the same area, -however, Git cannot randomly pick one side over the other, and asks you to -resolve it by leaving what both sides did to that area.quoted
- * Look at the diffs from each branch. `git log --merge -p <path>` - will show diffs first for the `HEAD` version and then the - `MERGE_HEAD` version.I think these are both valuable pieces of information we have lost in the new guide (unless I misremember just having read patch 1 :). The first explains a bit more about what a conflict *is*. Maybe that's old-hat nowadays, but I think it could be nice to keep a statement about why conflicts exist.
Will think about this!
The second is a very useful way to get more context to help resolve conflicts! I have an alias "conflict = log --oneline --graph --left-right --boundary --merge" for a similar purpose, and I think the new guide should help folks discover --merge. Often I can get a better sense of how to resolve conflicts by comparing the original changes on each side, or I might at least know who to ask about what to do.
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. I thought that `--merge` meant that it had something to do with merge commits, but upon further investigation it looks like that's not true, and that `--merges` is related to merge commits, `--merge` is something totally different which is relevant any time there's a conflict My best guess now is that it would make sense to include this under "Tools to get more context". Maybe something like this:
`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.
("which caused the merge conflict for" is a little more vague, but
I'm trying to convey the intent, and hopefully folks can look at
`man git log` if they want to know the specifics)
This does sound really useful.