Git push failed

I executed git push origin master and I got the following error. failed to push some refs to github.


The error message describes exactly what’s going on: There are commits in your Github repository that are not in your local repository. You’ll need to either merge the remote changes with your local work (if you want to keep both local and remote changes) or override the warning (if you are absolutely sure you want to get rid of the remote-only changes).

thank you for your help. I don’t know how to merge the remote changes with local repository.

git fetch upstream
git merge upstream/master
1 Like

Or simply use

git pull

thank you for your support. I used

git pull origin master.

given reason in editor and saved.