I am trying to push to a remote repo but keep getting the error below.
$ git push
To user@remote.net:/home/user/repos/remoterepo.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'user@remote:/home/user/repos/remoterepo.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
git remote show origin
shows master pushes to master (local out of date)
. I am positive that it shouldn't be out of date as I push only from the branch.
I have 2 questions.
is it possible to force the local branch to overwrite the remote? Pulling will overwrite the changes which are definitely later that the stuff in the repository.
This is about the 2nd or 3rd time I have had this problem. The only thing I can think of that the local version of git is
git version 1.7.3.1.msysgit.0
(on Windows)and the remote version isgit version 1.6.5
(Ubuntu Jaunty). Is it possible that the different git versions may be causing some corruption?