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.
Written by Kristian Lewis Jones
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#