summaryrefslogtreecommitdiff
path: root/Documentation/git-checkout.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/git-checkout.txt')
-rw-r--r--Documentation/git-checkout.txt19
1 files changed, 13 insertions, 6 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 5aa69c0..15fdb08 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/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] [<tree-ish>] [--] <paths>...
DESCRIPTION
-----------
@@ -23,14 +23,17 @@ options, which will be passed to `git branch`.
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.
OPTIONS
-------
@@ -38,8 +41,12 @@ 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.
-b::
Create a new branch named <new_branch> and start it at