分离头指针状态
当用户执行
git checkout <commit id>
执行完命令会有下面的提示,提示你在分离头指针状态,在这个状态下修改提交的代码不会提交到正常的分支
Note: checking out '952770d'.
You are in '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 performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-n