主页 > 电脑硬件  > 

gitte远程仓库修改后,本地没有更新,本地与远程仓库不一致

gitte远程仓库修改后,本地没有更新,本地与远程仓库不一致

问题 :gitte远程仓库修改后,本地没有更新,本地与远程仓库不一致 现象:

[cxq@iZwz9fjj2ssnshikw14avaZ rpc]$ git push Username for ' gitee ': beihangya Password for ' beihangya@gitee ': To gitee /beihangya/rpc.git ! [rejected] master -> master (fetch first) error: failed to push some refs to ' gitee /beihangya/rpc.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first merge the remote changes (e.g., hint: 'git pull') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

解决方案 1、拉取远程更改: 首先从远程仓库拉取最新的更改并合并到本地:

git pull origin master

如果有冲突,需要手动解决冲突。 2、解决冲突: 如果拉取过程中出现冲突,根据提示解决冲突 3、再次推送: 解决冲突并合并远程更改后,再次尝试推送:

git pull origin master
标签:

gitte远程仓库修改后,本地没有更新,本地与远程仓库不一致由讯客互联电脑硬件栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“gitte远程仓库修改后,本地没有更新,本地与远程仓库不一致