To delete a file one can:
git rm path/to/file
When I want to unstage a deleted file in git, I have to:
git reset -- path/to/file
git checkout -- path/to/file
I don't quite understand why the --
is necessary and how the command differs from:
git reset path/to/file
git checkout path/to/file
other that the latter wouldn't work.
What's the rationale behind --
?
The fatal error states:
Use '--' to separate paths from revisions
yet I still don't quite understand the difference.