Git push error '[remote rejected] master -> master (branch is currently checked out)'

前端 未结 30 2199
半阙折子戏
半阙折子戏 2020-11-22 00:07

Yesterday, I posted a question on how to clone a Git repository from one of my machines to another, How can I \'git clone\' from another machine?.

I am now

30条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-22 00:31

    I had to re-run git --init in an existing bare repository, and this had created a .git directory inside the bare repository tree - I realized that after typing git status there. I deleted that and everything was fine again :)

    (All these answers are great, but in my case it was something completely different (as far as I can see), as described.)

提交回复
热议问题