@matheusbsbs / matheus-bagliano / commits / b40bb374a6
Fork 0

Documentation: merge: add an overview

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> Signed-off-by: Thomas Rast <trast@student.ethz.ch>

Jonathan Nieder committed Jan 23, 2010 at 03:42 UTC b40bb374a618534b930ce4da5ffffb215b5cb488
1 file changed +26 -2
Documentation/git-merge.txt
+26 -2
@@ -15,8 +15,32 @@ SYNOPSIS
15
16 DESCRIPTION
17 -----------
18 -Merges the history specified by <commit> into HEAD, optionally using a
19 -specific merge strategy.
18 +Incorporates changes from the named commits (since the time their
19 +histories diverged from the current branch) into the current
20 +branch. This command is used by 'git pull' to incorporate changes
21 +from another repository and can be used by hand to merge changes
22 +from one branch into another.
23 +
24 +Assume the following history exists and the current branch is
25 +"`master`":
26 +
27 +------------
28 + A---B---C topic
29 + /
30 + D---E---F---G master
31 +------------
32 +
33 +Then "`git merge topic`" will replay the changes made on the
34 +`topic` branch since it diverged from `master` (i.e., `E`) until
35 +its current commit (`C`) on top of `master`, and record the result
36 +in a new commit along with the names of the two parent commits and
37 +a log message from the user describing the changes.
38 +
39 +------------
40 + A---B---C topic
41 + / \
42 + D---E---F---G---H master
43 +------------
44
45 The second syntax (<msg> `HEAD` <commit>...) is supported for
46 historical reasons. Do not use it from the command line or in