When doing checkout, I got this message:
$ git checkout HEAD~2
Note: switching to 'HEAD~2'.
You are in a 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits that you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
What does the dash mean in git switch -
? Is it always the previous branch?