Home  >  Q&A  >  body text

git 提交代码到github出错

如图,在我指定远程主机之后,把本地的仓库push到github就抱如下的错误。请问这是怎么回事??求指导。。谢谢!!

高洛峰高洛峰2750 days ago662

reply all(2)I'll reply

  • 某草草

    某草草2017-05-02 09:33:10

    Have you also written code in the remote warehouse? If so, firstgit pullgit push

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-02 09:33:10

    Looking at the prompts, it seems that the branch of the remote warehouse is newer than your local branch. You need to use the git pull command to pull down the code from the remote warehouse first, so that the local code can be updated before you can use git push to the remote warehouse. If there is a conflict, it needs to be resolved.
    You can refer to this blog post:
    Git usage-conflict resolution

    reply
    0
  • Cancelreply