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

[PATCH 4/7] Documentation: merge: add an overview

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 23, 2010, 09:42 UTC
Message-ID
<20100123094246.GE7571@progeny.tock>
In-Reply-To
<20100123092551.GA7571@progeny.tock>

The reader unfamiliar with the concepts of branching and merging would have been completely lost. Try to help him with a diagram.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
The advice in [1] was very helpful.  I fear I’ve made a mess of
the language even so.  At least it does seem much clearer now.
Thoughts?
[1] http://thread.gmane.org/gmane.comp.version-control.git/136356/focus=136629
 Documentation/git-merge.txt |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index 83bf3e7..a7a40c6 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -15,8 +15,32 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-Merges the history specified by <commit> into HEAD, optionally using a
-specific merge strategy.
+Incorporates changes from the named commits (since the time their
+histories diverged from the current branch) into the current
+branch.  This command is used by 'git pull' to incorporate changes
+from another repository and can be used by hand to merge changes
+from one branch into another.
+
+Assume the following history exists and the current branch is
+"`master`":
+
+------------
+          A---B---C topic
+         /
+    D---E---F---G master
+------------
+
+Then "`git merge topic`" will replay the changes made on the
+`topic` branch since it diverged from `master` (i.e., `E`) until
+its current commit (`C`) on top of `master`, and record the result
+in a new commit along with the names of the two parent commits and
+a log message from the user describing the changes.
+
+------------
+          A---B---C topic
+         /         \
+    D---E---F---G---H master
+------------
 
 The second syntax (<msg> `HEAD` <commit>...) is supported for
 historical reasons.  Do not use it from the command line or in
-- 
1.6.6
Previous: Jonathan NiederNext: Raja R Harinath
Message 5 of 11 in “clarify 'git merge' documentation”
  1. 0/7 clarify 'git merge' documentationJonathan Nieder, Jan 23, 2010
  2. 1/7 Documentation: merge: move configuration section to endJonathan Nieder, Jan 23, 2010
  3. 2/7 Documentation: suggest `reset --merge` in How Merge Works sectionJonathan Nieder, Jan 23, 2010
  4. 3/7 Documentation: merge: move merge strategy list to endJonathan Nieder, Jan 23, 2010
  5. 4/7 Documentation: merge: add an overviewJonathan Nieder, Jan 23, 2010
  6. Raja R HarinathFeb 12, 2010
  7. 5/7 Documentation: emphasize when git merge terminates earlyJonathan Nieder, Jan 23, 2010
  8. 6/7 Documentation: merge: add a section about fast-forwardJonathan Nieder, Jan 23, 2010
  9. 7/7 Documentation: simplify How Merge WorksJonathan Nieder, Jan 23, 2010
  10. Thomas RastJan 24, 2010
  11. Junio C HamanoJan 24, 2010

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.