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

后端 未结 24 3006
说谎
说谎 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:17

    The reason it happened in my case was when creating the GitHub rep link, I initialized it with README file

    While creating Git remote do not initialize it with README file otherwise it would show err

    Don't do that & it will definitely work fine Instead initialize it with the readme file if you wish to after pushing to the master branch

提交回复
热议问题