This question already has an answer here:
- What do git checkouts really mean? 3 answers
- Git checkout with dot 2 answers
While I understand that the command in the title is akin to undo the changes to the current repository, I am unable to understand how it actually works or how to read the command. Any leads would be a great help.
git-checkout - Switch branches or restore working tree files
Example: git checkout -b [branch]
See documentation, especially here and here:
.
is treated as<pathspec>
in your case, adressing the current directory. The currentHEAD
revision of all files in the given<pathspec>
, so in your case everything in your base directory, are checked out.