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 everything is up to date. Any idea how to solve the error? I also started getting ‘no version information available’ message, I don’t know does that have anything to do with the error.
git push origin master
git: /usr/local/lib/libz.so.1: no version information available (required by git)
Enter passphrase for key '/root/.ssh/id_rsa':
To git@[mydomain].beanstalkapp.com:/repo-git.git
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to 'git@[mydomain].beanstalkapp.com:/repo-git.git'
The error is that somebody else has pushed in the
masterbranch and you would overwrite their change ifgitallowed you to push (this is whatnon-fast forwarderror means). So you need to merge your localmasterbranch with the remotemasterbranch.This can happen if you did the
git pullwhile the local branch was not themasterbranch. If you only want to push the branch you are working on and not themasterbranch, you need to tell it togitusing the complete form ofgit-push: