summaryrefslogtreecommitdiffstats
path: root/git-checkout.txt
diff options
context:
space:
mode:
authorJunio C Hamano <junio@hera.kernel.org>2008-10-10 15:31:42 +0000
committerJunio C Hamano <junio@hera.kernel.org>2008-10-10 15:31:42 +0000
commita476efaaca349e01dfbc4e1009ab534aa511479b (patch)
treeb0f05e148f284deb9030edaf25419f9f704adb32 /git-checkout.txt
parent7cc912979feaec3ed65d4491e129ed48507f6994 (diff)
downloadgit-htmldocs-a476efaaca349e01dfbc4e1009ab534aa511479b.tar.gz
Autogenerated HTML docs for v1.6.0.2-514-g23abd3
Diffstat (limited to 'git-checkout.txt')
-rw-r--r--git-checkout.txt41
1 files changed, 34 insertions, 7 deletions
diff --git a/git-checkout.txt b/git-checkout.txt
index be54a0299..82e154de4 100644
--- a/git-checkout.txt
+++ b/git-checkout.txt
@@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'git checkout' [-q] [-f] [--track | --no-track] [-b <new_branch> [-l]] [-m] [<branch>]
-'git checkout' [<tree-ish>] [--] <paths>...
+'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
DESCRIPTION
-----------
@@ -27,14 +27,20 @@ the first namespace level.
When <paths> are given, this command does *not* switch
branches. It updates the named paths in the working tree from
-the index file (i.e. it runs `git checkout-index -f -u`), or
-from a named commit. In
-this case, the `-f` and `-b` options are meaningless and giving
+the index file, or from a named commit. In
+this case, the `-b` options is meaningless and giving
either of them results in an error. <tree-ish> argument can be
used to specify a specific tree-ish (i.e. commit, tag or tree)
to update the index for the given paths before updating the
working tree.
+The index may contain unmerged entries after a failed merge. By
+default, if you try to check out such an entry from the index, the
+checkout operation will fail and nothing will be checked out.
+Using -f will ignore these unmerged entries. The contents from a
+specific side of the merge can be checked out of the index by
+using --ours or --theirs. With -m, changes made to the working tree
+file can be discarded to recreate the original conflicted merge result.
OPTIONS
-------
@@ -42,8 +48,17 @@ OPTIONS
Quiet, suppress feedback messages.
-f::
- Proceed even if the index or the working tree differs
- from HEAD. This is used to throw away local changes.
+ When switching branches, proceed even if the index or the
+ working tree differs from HEAD. This is used to throw away
+ local changes.
++
+When checking out paths from the index, do not fail upon unmerged
+entries; instead, unmerged entries are ignored.
+
+--ours::
+--theirs::
+ When checking out paths from the index, check out stage #2
+ ('ours') or #3 ('theirs') for unmerged paths.
-b::
Create a new branch named <new_branch> and start it at
@@ -84,7 +99,9 @@ exlicitly give a name with '-b' in such a case.
based sha1 expressions such as "<branchname>@\{yesterday}".
-m::
- If you have local modifications to one or more files that
+--merge::
+ When switching branches,
+ if you have local modifications to one or more files that
are different between the current branch and the branch to
which you are switching, the command refuses to switch
branches in order to preserve your modifications in context.
@@ -96,6 +113,16 @@ When a merge conflict happens, the index entries for conflicting
paths are left unmerged, and you need to resolve the conflicts
and mark the resolved paths with `git add` (or `git rm` if the merge
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.
+
+--conflict=<style>::
+ 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).
<new_branch>::
Name for the new branch.