Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试过这样的事情:
git branch temp
创建一个新分支但不要移动HEAD. 但我得到:
HEAD
# Not currently on any branch.
我不想合并任何东西,我只想在当前的HEAD.
你坐在一个分离的HEAD:
git checkout <sha>
您想在该提交处创建一个分支:
git branch my-new-branch
现在切换到该分支:
git checkout my-new-branch
您还可以使用:
git switch -c <new branch name>