Improve section "Merging multiple trees"
Remove unnecessary quoting. Simplify description of three-way merge. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Ackermann committed
Aug 27, 2013 at 20:03 UTC
e8e9964de489412aae2c9b8420d2fab8b00e9d12
1 file changed
+13
-14
Documentation/user-manual.txt
+13
-14
@@ -4004,27 +4004,26 @@ to see what the top commit was.
4004
Merging multiple trees
4005
----------------------
4006
4007
-Git helps you do a three-way merge, which you can expand to n-way by
4008
-repeating the merge procedure arbitrary times until you finally
4009
-"commit" the state. The normal situation is that you'd only do one
4010
-three-way merge (two parents), and commit it, but if you like to, you
4011
-can do multiple parents in one go.
4007
+Git can help you perform a three-way merge, which can in turn be
4008
+used for a many-way merge by repeating the merge procedure several
4009
+times. The usual situation is that you only do one three-way merge
4010
+(reconciling two lines of history) and commit the result, but if
4011
+you like to, you can merge several branches in one go.
4012
4013
-To do a three-way merge, you need the two sets of "commit" objects
4014
-that you want to merge, use those to find the closest common parent (a
4015
-third "commit" object), and then use those commit objects to find the
4016
-state of the directory ("tree" object) at these points.
4013
+To perform a three-way merge, you start with the two commits you
4014
+want to merge, find their closest common parent (a third commit),
4015
+and compare the trees corresponding to these three commits.
4016
4018
-To get the "base" for the merge, you first look up the common parent
4019
-of two commits with
4017
+To get the "base" for the merge, look up the common parent of two
4018
+commits:
4019
4020
-------------------------------------------------
4021
$ git merge-base <commit1> <commit2>
4022
-------------------------------------------------
4023
4025
-which will return you the commit they are both based on. You should
4026
-now look up the "tree" objects of those commits, which you can easily
4027
-do with (for example)
4024
+This prints the name of a commit they are both based on. You should
4025
+now look up the tree objects of those commits, which you can easily
4026
+do with
4027
4028
-------------------------------------------------
4029
$ git cat-file commit <commitname> | head -1