Git Push 出现 remote: error: couldn't set 'refs/heads/master'

新手上路,请多包涵

远程库是以公司共享网络来创建的,只有创建者可以push,而其他人push不了。

git.exe push --progress "origin" master:master

Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 4 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 27.16 KiB | 88.00 KiB/s, done.
Total 7 (delta 2), reused 0 (delta 0)
**remote: error: couldn't set 'refs/heads/master'**
To //192.168.xx.xxx/xx/xxxx
! [remote rejected] master -> master (failed to update ref)
error: failed to push some refs to '//192.168.xx.xxx/xx/xxxx'

哪位大神救救命,整了一天都整不出来,百度资料少的可怜,还上不了谷歌。哭死T T

阅读 6.4k
1 个回答

在你的项目文件夹中,打开终端运行以下命令:

echo ref: refs/heads/master >.git/HEAD
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进