summaryrefslogtreecommitdiffstats
path: root/git-checkout.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-26 16:44:27 -0700
committerJunio C Hamano <gitster@pobox.com>2016-09-26 16:44:27 -0700
commitad70bf0a8bcaab0a6f1c36a42110b52dc2b00beb (patch)
tree95495194621897b14bcc1d50852cc2fa8bbbf2f6 /git-checkout.txt
parent5380048278a5f5aa14549fffee029a8273a8bd0d (diff)
downloadgit-htmldocs-ad70bf0a8bcaab0a6f1c36a42110b52dc2b00beb.tar.gz
Autogenerated HTML docs for v2.10.0-440-g21f86
Diffstat (limited to 'git-checkout.txt')
-rw-r--r--git-checkout.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/git-checkout.txt b/git-checkout.txt
index 7a2201b05..8e2c0662d 100644
--- a/git-checkout.txt
+++ b/git-checkout.txt
@@ -419,6 +419,18 @@ $ git reflog -2 HEAD # or
$ git log -g -2 HEAD
------------
+ARGUMENT DISAMBIGUATION
+-----------------------
+
+When there is only one argument given and it is not `--` (e.g. "git
+checkout abc"), and when the argument is both a valid `<tree-ish>`
+(e.g. a branch "abc" exists) and a valid `<pathspec>` (e.g. a file
+or a directory whose name is "abc" exists), Git would usually ask
+you to disambiguate. Because checking out a branch is so common an
+operation, however, "git checkout abc" takes "abc" as a `<tree-ish>`
+in such a situation. Use `git checkout -- <pathspec>` if you want
+to checkout these paths out of the index.
+
EXAMPLES
--------