@matheusbsbs / matheus-bagliano / commits / 34ad1afa71
Fork 0

git-merge documentation: more details about resolving conflicts

Signed-off-by: Dan Hensgen <dan@methodhead.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Dan Hensgen committed Aug 21, 2008 at 23:32 UTC 34ad1afa712da208f29d8300b73a6753516564fb
1 file changed +18 -6
Documentation/git-merge.txt
+18 -6
@@ -126,13 +126,25 @@ After seeing a conflict, you can do two things:
126 up working tree changes made by 2. and 3.; 'git-reset --hard' can
127 be used for this.
128
129 - * Resolve the conflicts. `git diff` would report only the
130 - conflicting paths because of the above 2. and 3.
131 - Edit the working tree files into a desirable shape
132 - ('git mergetool' can ease this task), 'git-add' or 'git-rm'
133 - them, to make the index file contain what the merge result
134 - should be, and run 'git-commit' to commit the result.
129 + * Resolve the conflicts. Git will mark the conflicts in
130 + the working tree. Edit the files into shape and
131 + 'git-add' to the index. 'git-commit' to seal the deal.
132
133 +You can work through the conflict with a number of tools:
134 +
135 + * Use a mergetool. 'git mergetool' to launch a graphical
136 + mergetool which will work you through the merge.
137 +
138 + * Look at the diffs. 'git diff' will show a three-way diff,
139 + highlighting changes from both the HEAD and remote versions.
140 +
141 + * Look at the diffs on their own. 'git log --merge -p <path>'
142 + will show diffs first for the HEAD version and then the
143 + remote version.
144 +
145 + * Look at the originals. 'git show :1:filename' shows the
146 + common ancestor, 'git show :2:filename' shows the HEAD
147 + version and 'git show :3:filename' shows the remote version.
148
149 SEE ALSO
150 --------