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

小咪咪 2022-01-22 05:17 397阅读 0赞

git push

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

git status

  1. $ git status
  2. HEAD detached from da74766
  3. nothing to commit, working tree clean

branch

  1. $ git branch -a
  2. * (HEAD detached from da74766)
  3. master
  4. remotes/origin/HEAD -> origin/master
  5. remotes/origin/develop
  6. remotes/origin/hotfix

只好这样了

  1. $ git push origin HEAD:develop

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

发表评论

表情:
评论列表 (有 0 条评论,397人围观)

还没有评论,来说两句吧...

相关阅读