What is the difference between git checkout [commit-name] and
git checkout [commit-name] . ?
I saw that the first command changes to detached head state, where you can commit up from there and go on to create a new branch.
I am confused as to what the second command does. It stays on the master but reverts all the files back to the state at the specified commit. Why is it so? What can you do with this and in what situations is this used?