path: root/Documentation
diff options
authorJunio C Hamano <>2008-09-01 02:32:40 (GMT)
committerJunio C Hamano <>2008-09-01 03:09:21 (GMT)
commiteac5a401512181cd315a1031af2b8a25430e335a (patch)
tree246e7b22c653c94af9a0cd615281b92e39fda902 /Documentation
parent0cf8581e330e7140c9f5c94a53d441187c0f8ff9 (diff)
checkout --conflict=<style>: recreate merge in a non-default style
This new option does essentially the same thing as -m option when checking unmerged paths out of the index, but it uses the specified style instead of configured merge.conflictstyle. Setting "merge.conflictstyle" to "diff3" is usually less useful than using the default "merge" style, because the latter allows a conflict that results by both sides changing the same region in a very similar way to get simplified substancially by reducing the common lines. However, when one side removed a group of lines (perhaps a function was moved to some other file) while the other side modified it, the default "merge" style does not give any clue as to why the hunk is left conflicting. You would need the original to understand what is going on. The recommended use would be not to set merge.conflictstyle variable so that you would usually use the default "merge" style conflict, and when the result in a path in a particular merge is too hard to understand, use "git checkout --conflict=diff3 $path" to check it out with the original to review what is going on. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation')
1 files changed, 9 insertions, 1 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index c884862..13b106d 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -9,7 +9,7 @@ SYNOPSIS
'git checkout' [-q] [-f] [[--track | --no-track] -b <new_branch> [-l]] [-m] [<branch>]
-'git checkout' [-f|--ours|--theirs|-m] [<tree-ish>] [--] <paths>...
+'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
@@ -84,6 +84,7 @@ entries; instead, unmerged entries are ignored.
based sha1 expressions such as "<branchname>@\{yesterday}".
When switching branches,
if you have local modifications to one or more files that
are different between the current branch and the branch to
@@ -101,6 +102,13 @@ should result in deletion of the path).
When checking out paths from the index, this option lets you recreate
the conflicted merge in the specified paths.
+ The same as --merge option above, but changes the way the
+ conflicting hunks are presented, overriding the
+ merge.conflictstyle configuration variable. Possible values are
+ "merge" (default) and "diff3" (in addition to what is shown by
+ "merge" style, shows the original contents).
Name for the new branch.