I started to get \'failed to push some refs\' error when I changed some files and tried to do push. Most instructions tell to do git pull first. I have done it and git says ever
The error is that somebody else has pushed in the master
branch and you would overwrite their change if git
allowed you to push (this is what non-fast forward
error means). So you need to merge your local master
branch with the remote master
branch.
This can happen if you did the git pull
while the local branch was not the master
branch. If you only want to push the branch you are working on and not the master
branch, you need to tell it to git
using the complete form of git-push
:
$ git push remote local-branch:remote-branch