I am trying to upload some of my projects to GitHub and I always see this error, you who think
Asked
Active
Viewed 213 times
2 Answers
1
git tell you to pull modifications done by other(s), so :
git pull origin master
git push -u origin master

Gilles Quénot
- 173,512
- 41
- 224
- 223
0
When this occurs. You usually have two options.
Save the changes from
origin
, then push it again. In terminal, you do$ git pull origin master
Not to care the changes of
origin
, so type:$ git push -u origin master --force
Then git will perform a
force update
. So your commits from local will be pushed.
In GitHub, this frequently happens if you both edit files in the remote and local. My suggestion is that if you use Git, you'd better not to use GitHub to edit files. Or you often need to force push

TravorLZH
- 302
- 1
- 9