Topic: git push origin master

Attempted to add GitHub as the origin for my main master branch and push repository up to Git and received this rejection/error message:
git push origin master
! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to ''
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.

Any immediate insight???

Re: git push origin master

It seems like you have some diffs between your local files and remote ones (at git remote); try to hit

git pull

in the terminal, then

git commit -a -m 'These are new changes'

before pushing to Git.
You can always check your git status as follows:

git status

and see modified files.

Last edited by Javix (2013-01-22 07:32:29)