fatal: You are not currently on a branch. To push the history leading to the current (detached HEAD)

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一份了

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页