The Git repository at the following path is in the detached HEAD state

前言:

      在使用git的时候报错:

The Git repository at the following path is in the detached HEAD state:
You can look around, make experimental changes and commit them, but be sure to checkout a branch not to lose your work. Otherwise you risk losing your changes

分析问题:

      是因为当前的分支不明确,也就是切换分支实际是失败了,可能是你输入的名称有误

解决办法:

    重新输入切换分支命令

猜你喜欢

转载自blog.csdn.net/weixin_44727080/article/details/113129053