次のパスのGitリポジトリはデタッチされたHEAD状態です

序文:

      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

問題の分析:

      現在のブランチが明確でない、つまりスイッチブランチが実際に失敗したためです。入力した名前が間違っている可能性があります。

解決:

    switchbranchコマンドを再入力してください

おすすめ

転載: blog.csdn.net/weixin_44727080/article/details/113129053