git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 17:15 UTC

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

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 2, 2026, 17:50 UTC
Message-ID
<xmqqh5j4vvor.fsf@gitster.g>
In-Reply-To
<4e579181-e93a-4746-8c2d-b127cb0e053d@app.fastmail.com>
"Julia Evans" <julia@jvns.ca> writes:
Show 11 quoted lines
> Like I mentioned before elsewhere it takes a super light approach to
> introducing the 3-way merge. (there is intentionally no mention
> of "since they diverged from the common ancestor" etc)
>
>     WHAT IS A MERGE CONFLICT?
>     -------------------------
>
>     When Git merges two commits together, it looks at the changes that
>     each side has made and combines those changes. For example, if one side
>     edited lines 1-5 of `hello.py` and the other side edited lines 20-25 of
>     `hello.py`, then it can easily combine them.
Some immediate reactions.
 - Is it obvious that the reason why it can "easily combine" them,
   or would it help to be more explicit (i.e., "as there is no
   overlap")?
 - The second "of `hello.py`" forced me to go back and look at the
   first one again to make sure we are talking about the same file.
   I would imagine if the latter were "lines 20-25 of the same file",
   it would have read better at least to me.
>     But if both sides edited overlapping lines of the same file (for example
>     one side edited lines 1-5 and the other edited lines 3-6), Git will
>     not try to guess how to combine those changes. This is called a "merge
>     conflict".
 - "cannot guess" would be more direct than "will not try to guess".
>     When this happens, Git shows you both sides' edits and asks you to pick
>     how to resolve them. It:
>
>     * Stages all of the files which were successfully merged
 - "merged without conflicts" would be more direct than "successfully merged".
>     * For the files with conflicts, it leaves them unstaged, puts both
>       sides' edits in the file, and leaves <<markers, merge conflict markers>>
>       that you need to resolve.
 - "unstaged" sounds as if somebody ran "git rm --cached" on the
   paths, but that is not what you want to tell your readers.
 - "it leaves them unstaged" -> "it remembers them as conflicted",
   perhaps?  This hints that Git has a mechanism to remember the
   conflicted paths even after you removed the conflict markers from
   the file to your readers.
Previous: Julia EvansNext: Junio C Hamano
Message 34 of 46 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. 2/7 [doc] git-merge: link to new merge conflicts guideJulia Evans via GitGitGadget, Sep 24, 2026
  4. 3/7 [doc] git-rebase: link to new merge conflicts guideJulia Evans via GitGitGadget, Sep 24, 2026
  5. 4/7 [doc] git-revert: link to new merge conflicts guideJulia Evans via GitGitGadget, Sep 24, 2026
  6. 5/7 [doc] git-cherry-pick: link to new merge conflicts guideJulia Evans via GitGitGadget, Sep 24, 2026
  7. 6/7 [doc] git-pull: link to new merge conflicts guideJulia Evans via GitGitGadget, Sep 24, 2026
  8. 7/7 [doc] ignore conflict markers in gitmergeconflicts.adocJulia Evans via GitGitGadget, Sep 24, 2026
  9. Junio C HamanoSep 24, 2026
  10. Junio C HamanoSep 24, 2026
  11. Junio C HamanoSep 24, 2026
  12. Jeff KingSep 24, 2026
  13. D. Ben KnobleSep 25, 2026
  14. D. Ben KnobleSep 25, 2026
  15. Julia EvansSep 25, 2026
  16. Junio C HamanoSep 25, 2026
  17. Junio C HamanoSep 25, 2026
  18. Ben KnobleSep 25, 2026
  19. Ben KnobleSep 25, 2026
  20. Junio C HamanoSep 25, 2026
  21. Julia EvansSep 28, 2026
  22. Julia EvansSep 28, 2026
  23. Junio C HamanoSep 28, 2026
  24. Jeff KingSep 29, 2026
  25. Junio C HamanoSep 29, 2026
  26. Patrick SteinhardtSep 30, 2026
  27. Patrick SteinhardtSep 30, 2026
  28. Julia EvansSep 30, 2026
  29. Junio C HamanoSep 30, 2026
  30. Patrick SteinhardtOct 1, 2026
  31. Julia EvansOct 1, 2026
  32. Julia EvansOct 2, 2026
  33. Julia EvansOct 2, 2026
  34. Junio C HamanoOct 2, 2026
  35. Junio C HamanoOct 2, 2026
  36. Julia EvansOct 2, 2026
  37. Junio C HamanoOct 2, 2026
  38. D. Ben KnobleOct 3, 2026
  39. D. Ben KnobleOct 3, 2026
  40. Junio C HamanoOct 3, 2026
  41. Julia EvansOct 5, 2026
  42. Junio C HamanoOct 5, 2026
  43. Julia EvansOct 5, 2026
  44. Julia EvansOct 5, 2026
  45. D. Ben KnobleOct 6, 2026
  46. D. Ben KnobleOct 6, 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.