git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 2/6] doc: git-merge: link to new merge conflicts guide

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 9, 2026, 18:20 UTC
Message-ID
<xmqq8q46rb0t.fsf@gitster.g>
In-Reply-To
<d5241eb901a2cc405bdebedc30d7e8c359898ba4.1791547213.git.gitgitgadget@gmail.com>
"Julia Evans via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Julia Evans <julia@jvns.ca>
>
> All of the info about merge conflicts has been moved to the new guide
In the body text end the sentence with a full stop.

And I just went though the "new guide" with fine toothed comb, I am very much qualified to judge if the above claim is correct. Let's see.

Show 14 quoted lines
> @@ -231,127 +232,6 @@ git merge v1.2.3^0
>  git merge --ff-only v1.2.3
>  ----
>  
> -HOW CONFLICTS ARE PRESENTED
> ----------------------------
> -
> -During a merge, the working tree files are updated to reflect the result
> -of the merge.  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.

OK. We said working tree files are updated. We made a weak reference to "common ancestor" but with my suggested updates I think we sufficiently cover this. "Git cannot ... and asks you ..." had a nice nuance that we may not have captured in the new document (we stop at "will not try to guess" and say "asks you to pick" in a seaprate paragraph, which feels a bit detached than the original here [***]).

Show 25 quoted lines
> -By default, Git uses the same style as the one used by the "merge" program
> -from the RCS suite to present such a conflicted hunk, like this:
> -
> -------------
> -Here are lines that are either unchanged from the common
> -ancestor, or cleanly resolved because only one side changed,
> -or cleanly resolved because both sides changed the same way.
> -<<<<<<< yours:sample.txt
> -Conflict resolution is hard;
> -let's go shopping.
> -=======
> -Git makes conflict resolution easy.
> ->>>>>>> theirs:sample.txt
> -And here is another line that is cleanly resolved or unmodified.
> -------------
> -
> -The area where a pair of conflicting changes happened is marked with markers
> -+<<<<<<<+, `=======`, and +>>>>>>>+.  The part before the `=======`
> -is typically your side, and the part afterwards is typically their side.
> -
> -The default format does not show what the original said in the conflicting
> -area.  You cannot tell how many lines are deleted and replaced with
> -Barbie's remark on your side.  The only thing you can tell is that your
> -side wants to say it is hard and you'd prefer to go shopping, while the
> -other side wants to claim it is easy.

We covered all of the above, except for the reference to RCS which we explicitly wanted to lose. Good.

> -An alternative style can be used by setting the `merge.conflictStyle`
> ...
> -In addition to the +<<<<<<<+, `=======`, and +>>>>>>>+ markers, it uses
> -another +|||||||+ marker that is followed by the original text.

This is what we were missing in the new guide, which I tried to rectify without looking at this exact text. In any shape it should be preserved somehow [***].

Show 5 quoted lines
> - You can
> -tell that the original just stated a fact, and your side simply gave in to
> -that statement and gave up, while the other side tried to have a more
> -positive attitude.  You can sometimes come up with a better resolution by
> -viewing the original.

We covered this with "fruits from both sides" example, and I think the explanation there is shorter and simpler to understand.

Show 16 quoted lines
> -HOW TO RESOLVE CONFLICTS
> -------------------------
> -
> -After seeing a conflict, you can do two things:
> -
> - * Decide not to merge.  The only clean-ups you need are to reset
> -   the index file to the `HEAD` commit to reverse 2. and to clean
> -   up working tree changes made by 2. and 3.; `git merge --abort`
> -   can be used for this.
> -
> - * Resolve the conflicts.  Git will mark the conflicts in
> -   the working tree.  Edit the files into shape and
> -   `git add` them to the index.  Use `git commit` or
> -   `git merge --continue` to seal the deal. The latter command
> -   checks whether there is a (interrupted) merge in progress
> -   before calling `git commit`.

The new text tried to have a wiggle room with "most common", but nothing is lost from the above if we tweak it with my suggested "there are only two" [***].

Show 18 quoted lines
> -You can work through the conflict with a number of tools:
> -
> - * Use a mergetool.  `git mergetool` to launch a graphical
> -   mergetool which will work through the merge with you.
> -
> - * Look at the diffs.  `git diff` will show a three-way diff,
> -   highlighting changes from both the `HEAD` and `MERGE_HEAD`
> -   versions. `git diff AUTO_MERGE` will show what changes you've
> -   made so far to resolve textual conflicts.
> -
> - * 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.
> -
> - * Look at the originals.  `git show :1:filename` shows the
> -   common ancestor, `git show :2:filename` shows the `HEAD`
> -   version, and `git show :3:filename` shows the `MERGE_HEAD`
> -   version.

We covered this in "Tools for handling" section. This version groups AUTO_MERGE together with other tools, which may have its advantages and disadvantages. The latter two bullet points in the above list is about static view, so is three-way O A B diff. Use of mergetool and 'diff AUTO_MERGE" are more dynamic "how far have you come" view. So separating the "git diff" that shows three-way comparison and "git diff AUTO_MERGE" in the new document sounds like an improvement (even though 'mergetool' blurs the boundary between "how the conflict looked like" and "what your eventual conflict you are working toward may look like", though [***]).

Overall, I fully agree with these removals. We may want to take a few points (marked with [***]) we learned during this review back to the new document from here, though.

Thanks.
Previous: Julia Evans via GitGitGadgetNext: Julia Evans via GitGitGadget
Message 54 of 65 in “[doc] Add new page on merge conflicts”
  1. 0/7 [doc] Add new page on merge conflictsJulia Evans via GitGitGadget, Sep 24, 2026
  2. 1/7 [doc] Add new gitmergeconflicts man pageJulia Evans via GitGitGadget, Sep 24, 2026
  3. Junio C HamanoSep 24, 2026
  4. Junio C HamanoSep 24, 2026
  5. Patrick SteinhardtSep 30, 2026
  6. Julia EvansSep 30, 2026
  7. Junio C HamanoSep 30, 2026
  8. Patrick SteinhardtOct 1, 2026
  9. Julia EvansOct 1, 2026
  10. Junio C HamanoOct 2, 2026
  11. Julia EvansOct 5, 2026
  12. Junio C HamanoOct 5, 2026
  13. Julia EvansOct 5, 2026
  14. 2/7 [doc] git-merge: link to new merge conflicts guideJulia Evans via GitGitGadget, Sep 24, 2026
  15. D. Ben KnobleSep 25, 2026
  16. Julia EvansSep 25, 2026
  17. Junio C HamanoSep 25, 2026
  18. Ben KnobleSep 25, 2026
  19. Junio C HamanoSep 25, 2026
  20. Ben KnobleSep 25, 2026
  21. Julia EvansOct 2, 2026
  22. Junio C HamanoOct 2, 2026
  23. Julia EvansOct 2, 2026
  24. Junio C HamanoOct 2, 2026
  25. D. Ben KnobleOct 3, 2026
  26. Junio C HamanoOct 3, 2026
  27. Patrick SteinhardtSep 30, 2026
  28. 3/7 [doc] git-rebase: link to new merge conflicts guideJulia Evans via GitGitGadget, Sep 24, 2026
  29. 4/7 [doc] git-revert: link to new merge conflicts guideJulia Evans via GitGitGadget, Sep 24, 2026
  30. 5/7 [doc] git-cherry-pick: link to new merge conflicts guideJulia Evans via GitGitGadget, Sep 24, 2026
  31. Junio C HamanoSep 25, 2026
  32. Julia EvansSep 28, 2026
  33. Junio C HamanoSep 28, 2026
  34. 6/7 [doc] git-pull: link to new merge conflicts guideJulia Evans via GitGitGadget, Sep 24, 2026
  35. 7/7 [doc] ignore conflict markers in gitmergeconflicts.adocJulia Evans via GitGitGadget, Sep 24, 2026
  36. Junio C HamanoOct 7, 2026
  37. Julia EvansOct 9, 2026
  38. Junio C HamanoSep 24, 2026
  39. Jeff KingSep 24, 2026
  40. Julia EvansSep 28, 2026
  41. Jeff KingSep 29, 2026
  42. Junio C HamanoSep 29, 2026
  43. D. Ben KnobleSep 25, 2026
  44. Julia EvansOct 2, 2026
  45. D. Ben KnobleOct 3, 2026
  46. Julia EvansOct 5, 2026
  47. D. Ben KnobleOct 6, 2026
  48. D. Ben KnobleOct 6, 2026
  49. 0/6 [doc] Add new page on merge conflictsJulia Evans via GitGitGadget, Oct 9, 2026
  50. 1/6 doc: add new gitmergeconflicts man pageJulia Evans via GitGitGadget, Oct 9, 2026
  51. Junio C HamanoOct 9, 2026
  52. Julia EvansOct 9, 2026
  53. 2/6 doc: git-merge: link to new merge conflicts guideJulia Evans via GitGitGadget, Oct 9, 2026
  54. Junio C HamanoOct 9, 2026
  55. 3/6 doc: git-rebase: link to new merge conflicts guideJulia Evans via GitGitGadget, Oct 9, 2026
  56. Junio C HamanoOct 9, 2026
  57. 4/6 doc: git-revert: link to new merge conflicts guideJulia Evans via GitGitGadget, Oct 9, 2026
  58. Junio C HamanoOct 9, 2026
  59. 5/6 doc: git-cherry-pick: link to new merge conflicts guideJulia Evans via GitGitGadget, Oct 9, 2026
  60. Junio C HamanoOct 9, 2026
  61. 6/6 doc: git-pull: link to new merge conflicts guideJulia Evans via GitGitGadget, Oct 9, 2026
  62. Junio C HamanoOct 9, 2026
  63. Junio C HamanoOct 9, 2026
  64. Julia EvansOct 9, 2026
  65. Junio C HamanoOct 9, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.