On 25 September 2013 04:51, David Aguilar <davvid@xxxxxxxxx> wrote: > On Tue, Sep 24, 2013 at 2:07 PM, Jona Christopher Sahnwaldt > <jc@xxxxxxxxxxxx> wrote: >> Hi, >> >> maybe this has already been reported, but I didn't find it in the mail archive. >> >> If I understand correctly, after I clone a repo, I should be able to >> switch to branch foo just by running >> >> git checkout foo >> >> This doesn't seem to work if a folder called "foo" exists in the root >> of the repo. > > git checkout foo -- Thanks for the suggestion, but it doesn't work for me. With both 1.7.9.5 and 1.8.3.2, I get this: $ git checkout wiktionary -- fatal: invalid reference: wiktionary When I try the full branch name: $ git checkout origin/wiktionary -- Note: checking out 'origin/wiktionary'. You are in 'detached HEAD' state. You can [...] :-( Christopher > > The double-dash at the end disambiguates between refs and paths. > > You can use that trick on any command that accepts refspec (branches, > tags, etc) and pathspec (path patterns). > -- > David -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html