Possible Duplicate:
Why I cannot push my code to github?
I am trying to push origin master to git hub and I keep getting rejected, it prompts me for a username and password and I am sure it is correct.
This is the error I am getting
To https://github.com/anderskitson/omrails.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/anderskitson/omrails.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.
First do
then you can do
The reason why you are getting rejected, is because on the server there are commits that you don’t have locally, so you need to merge them before to push.
Same thing happens with subversion: you need to
svn upbefore doingsvn commit.