! [rejected] master -> master (fetch first)

后端 未结 24 2992
说谎
说谎 2020-12-02 04:15

Is there a good way to explain how to resolve \"! [rejected] master -> master (fetch first)\'\" in Git?

When I use this command $ git push or

24条回答
  •  长情又很酷
    2020-12-02 04:19

    This worked for me, since none of the other solutions worked for me. NOT EVEN FORCE!

    https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-using-the-command-line

    Just had to go through Git Bash

    cd REPOSITORY-NAME
    git add .
    git commit -m "Resolved merge conflict by incorporating both suggestions."
    

    Then back to my cmd and I could: git push heroku master which in my case was the problem.

提交回复
热议问题