不知道我是如何管理这个的,但我不能再创建本地和远程分支了。
~/myapp(master) > git checkout -b new_feature origin/new_feature
fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'origin/new_feature' which can not be resolved as commit?
Run Code Online (Sandbox Code Playgroud)
我试过重新克隆我的应用程序,以防 .git 目录损坏,但没有运气。有什么建议?
您不能以这种方式创建远程分支,您需要先git checkout -b new_feature创建新的本地分支,然后git push origin new_feature将分支推送到远程。