Git Detached HEAD State: Understanding and Working with It
Note: Checking out 'v1.6.20'.
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_name
HEAD currently located at 987c9b9... version bump
Translation:
注意:正在检查版本‘v1.6.20’。
您处于‘脱离HEAD’状态。您可以浏览,进行实验性更改并提交它们,您可以在此状态下放弃任何提交,而不会通过执行另一个检出来影响任何分支。
如果您想创建新分支以保留创建的提交,可以使用带有检出命令的-b来执行此操作(现在或以后)。 示例:
git checkout -b new_branch_name
HEAD 目前位于 987c9b9... 版本 bump
原文地址: https://www.cveoy.top/t/topic/m9aG 著作权归作者所有。请勿转载和采集!