I am learning the try git by code school
, and to the unit 1.17 Undo it use the command line
git checkout -- octocat.txt
and the octocat.txt is a file then and it explain that the two dash lines is
It's simply promising the command line that there are no more options after the '--'. This way if you happen to have a branch named octocat.txt, it will still revert the file, instead of switching to the branch of the same name.
but what I cannot understand is that what does it means by no options? And since there are no options after, why it can distinguish it by file from branch?