git push

$ git push
fatal: You are not currently on a branch.
To push the history leading to the current (detached HEAD)
state now, use

git status

$ git status
HEAD detached from da74766
nothing to commit, working tree clean

branch

$ git branch -a
* (HEAD detached from da74766)
  master
  remotes/origin/HEAD -> origin/master
  remotes/origin/develop
  remotes/origin/hotfix
 

只好这样了

$  git push origin HEAD:develop

实在不行只有先备份代码重新 clone一份了

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐