From: Angelo Borsotti Date: Mon, 03 Sep 2012 13:42:11 GMT Subject: checkout extra files Message-ID: Hello, the man page of git checkout states: git checkout [-p|--patch] [] [--] ... It updates the named paths in the working tree from the index file or from a named ... This means that for each file denoted by pathspec, git tries to restore it from the tree-ish. However, it seems that git does more than this: it restores also files that are not denoted by pathspec. This sequence of commands shows it: $ mkdir gittest $ cd gittest $ git init Initialized empty Git repository in d:/gittest/.git/ $ touch f1 $ git add f1 $ git commit commit -m "first commit" [master (root-commit) 94d882a] first commit 0 files changed create mode 100644 f1 $ rm f1 $ git checkout 94d8 -- * $ ls f1 Note that the work directory is empty when the checkout is done, and that the checkout restores f1 in it, a file that is not denoted by the * pathspec. I guess that this is the intended behaviour, and that the man page should be updated to tell exactly what files git restores. -Angelo Borsotti