From: "Julia Evans via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im, Julia Evans <julia@jvns.ca>
Subject: [PATCH 0/7] [doc] Add new page on merge conflicts
Date: Thu, 24 Sep 2026 14:44:15 +0000 [thread overview]
Message-ID: <pull.2237.git.1790261062.gitgitgadget@gmail.com> (raw)
Handling merge conflicts is difficult, and currently Git's guidance on merge
conflicts isn't giving users the information they need to navigate the
process. As usual, the process I used to write this was to collect comments
from Git users on the existing documentation, and then address those issues.
I listed the specific issues we're aiming to solve in the first commit
message in the series.
This patch series introduces a new manual page, gitmergeconflicts, which
explains the process of explaining a merge conflict with examples. It also
links to that new page from the commands which can cause merge conflicts,
instead of trying to reexplain the process every time.
This is a pretty big change, so here's a list of things I'm still
considering in the hopes that it'll help with the discussion:
* I wrote that git commit does the same thing as git merge --continue
during a git merge , but I'm not sure if that's always true.
* Not 100% sure that the explanation of diff3 vs zdiff3 is correct
* Right now we're listing git merge, git revert, git rebase, git
cherry-pick, and git pull as commands that can cause merge conflicts. I
believe that git apply and git am can also result in conflicts when
applying a patch, though it's a bit complicated because applying a patch
is a different operation than doing a 3-way merge and the tools available
for dealing with it are a different. My thought right now is to avoid the
issue of applying patches for now (because it's a whole can of worms) and
instead just try to not imply that this is necessarily an exhaustive
list. Also if/when the git rebase --squash changes land, then we'd need
to add git history to this list.
* Instead of creating a new page, I considered using an include to have a
"handling merge conflicts" section in git rebase, git merge, etc. Merge
conflict resolution is complex and it's very useful to be able to include
examples: this version ended up at ~300 lines and I think that's too big
of an include, especially for short man pages like cherry-pick
* Explaining what "ours" and "theirs" mean was one of the hardest parts of
writing this. From polling Git users in one of my many informal Mastodon
polls about Git, my understanding is that Git users are actually
relatively unlikely to actually reason about what "ours" and "theirs"
mean when dealing with a merge conflict, and that most people prefer to
get more context instead, for example by using a mergetool or by using
diff3 or zdiff3. I heard a lot of "I can never remember which is which I
so I don't even try". So I put the information about what "ours" and
"theirs" mean relatively far down the page (with some cross-references),
so that it's easily available but not the main focus.
* I removed a couple of mentions of the various _HEAD references. It's hard
for me to know exactly where they belong because I personally have never
used MERGE_HEAD, REBASE_HEAD, ORIG_HEAD, CHERRY_PICK_HEAD etc, and I
don't know how they're meant to be used. From some quick unscientific
polling (at https://social.jvns.ca/@b0rk/117320011885941855), it seems
like most Git users have never used them either (and folks who do use a
*_HEAD reference mainly seem to use FETCH_HEAD which isn't relevant
here), so from that perspective it seems important to avoid emphasizing
them too much. The git revert man page doesn't mention REVERT_HEAD and
git rebase only mentions REBASE_HEAD in passing. Of course they're all
explained in gitrevisions(7) which might be the best place for them.
* I'm still not sure what the SYNOPSIS section is for in a "guide" man page
which is not about a specific Git command (what is the user intended to
use it for?). I tried to leave it out but the CI said it was required.
Thanks to Lobo, Adam Svahn, Louis Vanier, David Turner, Ben Zanin, Salih,
and about 12 others who gave feedback on both the original git merge man
page, as well as the proposed improvements.
Julia Evans (7):
[doc] Add new gitmergeconflicts man page
[doc] git-merge: link to new merge conflicts guide
[doc] git-rebase: link to new merge conflicts guide
[doc] git-revert: link to new merge conflicts guide
[doc] git-cherry-pick: link to new merge conflicts guide
[doc] git-pull: link to new merge conflicts guide
[doc] ignore conflict markers in gitmergeconflicts.adoc
.gitattributes | 1 +
Documentation/Makefile | 1 +
Documentation/git-cherry-pick.adoc | 23 +--
Documentation/git-merge.adoc | 125 +-----------
Documentation/git-pull.adoc | 3 +-
Documentation/git-rebase.adoc | 13 +-
Documentation/git-revert.adoc | 5 +
Documentation/gitmergeconflicts.adoc | 294 +++++++++++++++++++++++++++
Documentation/meson.build | 1 +
9 files changed, 320 insertions(+), 146 deletions(-)
create mode 100644 Documentation/gitmergeconflicts.adoc
base-commit: 3bc0341126508f78f5869cbfc0005e987efdf0c7
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2237%2Fjvns%2Fmerge-conflicts-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2237/jvns/merge-conflicts-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2237
--
gitgitgadget
next reply other threads:[~2026-09-24 14:44 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 14:44 Julia Evans via GitGitGadget [this message]
2026-09-24 14:44 ` [PATCH 1/7] [doc] Add new gitmergeconflicts man page Julia Evans via GitGitGadget
2026-09-24 20:36 ` Junio C Hamano
2026-09-24 22:04 ` Junio C Hamano
2026-09-30 13:19 ` Patrick Steinhardt
2026-09-30 19:53 ` Julia Evans
2026-09-30 20:37 ` Junio C Hamano
2026-10-01 5:14 ` Patrick Steinhardt
2026-10-01 12:10 ` Julia Evans
2026-10-02 17:58 ` Junio C Hamano
2026-10-05 16:54 ` Julia Evans
2026-10-05 17:22 ` Junio C Hamano
2026-10-05 19:11 ` Julia Evans
2026-09-24 14:44 ` [PATCH 2/7] [doc] git-merge: link to new merge conflicts guide Julia Evans via GitGitGadget
2026-09-25 16:36 ` D. Ben Knoble
2026-09-25 16:59 ` Julia Evans
2026-09-25 18:19 ` Junio C Hamano
2026-09-25 19:32 ` Ben Knoble
2026-09-25 21:49 ` Junio C Hamano
2026-09-25 19:34 ` Ben Knoble
2026-10-02 17:01 ` Julia Evans
2026-10-02 17:50 ` Junio C Hamano
2026-10-02 18:53 ` Julia Evans
2026-10-02 21:38 ` Junio C Hamano
2026-10-03 2:25 ` D. Ben Knoble
2026-10-03 4:12 ` Junio C Hamano
2026-09-30 13:19 ` Patrick Steinhardt
2026-09-24 14:44 ` [PATCH 3/7] [doc] git-rebase: " Julia Evans via GitGitGadget
2026-09-24 14:44 ` [PATCH 4/7] [doc] git-revert: " Julia Evans via GitGitGadget
2026-09-24 14:44 ` [PATCH 5/7] [doc] git-cherry-pick: " Julia Evans via GitGitGadget
2026-09-25 17:17 ` Junio C Hamano
2026-09-28 20:58 ` Julia Evans
2026-09-28 21:25 ` Junio C Hamano
2026-09-24 14:44 ` [PATCH 6/7] [doc] git-pull: " Julia Evans via GitGitGadget
2026-09-24 14:44 ` [PATCH 7/7] [doc] ignore conflict markers in gitmergeconflicts.adoc Julia Evans via GitGitGadget
2026-10-07 21:21 ` Junio C Hamano
2026-10-09 12:06 ` Julia Evans
2026-09-24 22:20 ` [PATCH 0/7] [doc] Add new page on merge conflicts Junio C Hamano
2026-09-24 23:37 ` Jeff King
2026-09-28 20:41 ` Julia Evans
2026-09-29 1:32 ` Jeff King
2026-09-29 1:56 ` Junio C Hamano
2026-09-25 16:25 ` D. Ben Knoble
2026-10-02 17:39 ` Julia Evans
2026-10-03 2:29 ` D. Ben Knoble
2026-10-05 18:49 ` Julia Evans
2026-10-06 16:53 ` D. Ben Knoble
2026-10-06 17:09 ` D. Ben Knoble
2026-10-09 12:00 ` [PATCH v2 0/6] " Julia Evans via GitGitGadget
2026-10-09 12:00 ` [PATCH v2 1/6] doc: add new gitmergeconflicts man page Julia Evans via GitGitGadget
2026-10-09 17:58 ` Junio C Hamano
2026-10-09 18:53 ` Julia Evans
2026-10-09 12:00 ` [PATCH v2 2/6] doc: git-merge: link to new merge conflicts guide Julia Evans via GitGitGadget
2026-10-09 18:20 ` Junio C Hamano
2026-10-09 12:00 ` [PATCH v2 3/6] doc: git-rebase: " Julia Evans via GitGitGadget
2026-10-09 18:22 ` Junio C Hamano
2026-10-09 12:00 ` [PATCH v2 4/6] doc: git-revert: " Julia Evans via GitGitGadget
2026-10-09 18:24 ` Junio C Hamano
2026-10-09 12:00 ` [PATCH v2 5/6] doc: git-cherry-pick: " Julia Evans via GitGitGadget
2026-10-09 18:26 ` Junio C Hamano
2026-10-09 12:00 ` [PATCH v2 6/6] doc: git-pull: " Julia Evans via GitGitGadget
2026-10-09 18:27 ` Junio C Hamano
2026-10-09 15:41 ` [PATCH v2 0/6] [doc] Add new page on merge conflicts Junio C Hamano
2026-10-09 15:53 ` Julia Evans
2026-10-09 18:36 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.2237.git.1790261062.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=julia@jvns.ca \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox