Git: failed to push some refs although I have done git pull

前端 未结 7 1477
清酒与你
清酒与你 2021-02-07 01:19

I started to get \'failed to push some refs\' error when I changed some files and tried to do push. Most instructions tell to do git pull first. I have done it and git says ever

7条回答
  •  花落未央
    2021-02-07 01:47

    Be sure to verify that the pull actually worked. It is possible the merge (which is part of a pull) failed.

    When I had this error message I failed to notice the pull failed. The pull failed due to some uncommitted file changes (unrelated to the files I was trying to push) which caused the merge to fail. I reverted those file changes (because they were not important) and then did a pull again. After the successful pull, the push worked.

提交回复
热议问题