difference between "git checkout - . " and "git checkout -- ."

Viewed 988

I feel a little confused about these two option when using "git checkout"

I always used git checkout -- . to clear my working directory.

but today when I type git checkout - . by mistake. I found no error alert from git.

I have read the git documentation, and also do not know what this - option does. And this is hard to google.

So please anyone have any idea about this?

3 Answers
Related