Mahesh
Mahesh

Reputation: 2892

Failed to push code on git?

error: failed to push some refs to '[email protected]:apal.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.

Upvotes: 1

Views: 170

Answers (1)

ksimons
ksimons

Reputation: 3826

You need to pull the changes from the remote server before you can push your changes. So you should do git pull --rebase to rebase your changes on top of the remote ones. Then you can push.

Upvotes: 2

Related Questions