git出现这种错误是什么原因?error :hint?
给我你的怀抱
给我你的怀抱 2017-05-02 09:19:50
0
4
668

$ git push origin master
To git@github.com:qzmly100/repository-.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com:qzmly100/repository-.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 integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

分析一下如何解决?

给我你的怀抱
给我你的怀抱

reply all(4)
左手右手慢动作

Did you make the submission on a different machine? ?

There are commits on the remote branch that do not exist in the local branch. This is often a problem encountered during multi-person collaborative development. You can fetchmerge,也就是pull,把远程分支上的提交合并到本地分支之后再push first.

If you are sure that those commits on the remote branch are no longer needed, then directly git push origin master -f force the local branch to overwrite the remote branch. . .

世界只因有你

The version of your remote library is newer than your local library. You need to git pull to update your local library before you can git push to the remote library~

To put it simply, your remote library has things that the local library does not have. It needs to be synchronized first, and then the contents of the local library can be pushed to the remote library~

PHPzhong

Isn’t it very clear? . ?

Let youfetch first

Just git pull first...

洪涛

It may be that your local warehouse data is inconsistent with the remote warehouse data. You must first capture and merge all the contents of the remote warehouse (git pull origin master), and then push the local warehouse data (git push origin master)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template