Home  >  Q&A  >  body text

github - git提交报错

1、文件从github克隆到本地
2、修改了部分文件
3、git提交,报错如图
网上有人说是提交冲突,可是只是我在本地修改了啊

git pull --rebase
git push origin master
又报错,不理解原理真是让人一脸懵逼

为情所困为情所困2697 days ago680

reply all(3)I'll reply

  • 大家讲道理

    大家讲道理2017-05-02 09:38:13

    Thank you for the invitation. If a conflict occurs when executing git pull origin master, execute git push origin master after resolving the conflict. If there is no conflict, just execute git push origin master directly. Hope it helps you

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-02 09:38:13

    It seems that someone else has also submitted the code. Because the base point is different, your submission request has been rejected.

    You can try to execute it firstgit pull --rebase,如果有冲突,解决冲突;再git pushTry it once

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-02 09:38:13

    In this case, the code in the git repository is usually updated, and your local code is not the latest and cannot be pushed. Just execute the git pul command

    reply
    0
  • Cancelreply