I'm trying to push my master branch to my production branch.
Normally when I do changes on my Ubuntu computer I push to master by:
git add . git commit -m "message" git push And everything works fine. Then I simply do:
git push origin master:production And everything works fine. But now for some reason when I do the 'git push origin master:production' in Terminal I get the message:
To [email protected]:Username1/myapp.git ! [rejected] master -> production (non-fast-forward) error: failed to push some refs to '[email protected]:Username1/myapp.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. mypc@ubuntu:~/myapp$ How can I fix this irritating problem that has mysteriously arisen? I tried 'git pull origin master', as suggested in the message and elsewhere in my research, but all I get in Terminal is 'everything up to date' and the problem reoccurs when I try it again. Thanks.