Last Updated: February 25, 2016
·
368
· klj613

use "--" with git commands to specify files

Sometimes you want to re-checkout a file. Lets say the file name is "1":

git checkout 1

It will work... sometimes. If you had a branch/tag '1' then that will take priority and you will switch to a branch/tag.

You should always:

git checkout -- 1

So git will know its a file.