As my understanding, git checkout is about moving the head.
For example, git checkout <commit id> is to move the head to the <commit id>, git checkout <branch_name> is to move the head to the <branch_name>.
However, git checkout . is to discard the unstaged changes. it doesn't seem that there is any business about head.
So I can not understand why git uses the same key word checkout to do two totally no-relative things. Or git checkout . still works based on head?