diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 7a2201b0518b2752bcce880e12dd732ed32990d2..8e2c0662ddd72c1bc0765aadbbafd22b62b5adf6 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/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 `` +(e.g. a branch "abc" exists) and a valid `` (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 `` +in such a situation. Use `git checkout -- ` if you want +to checkout these paths out of the index. + EXAMPLES --------