tags:

views:

3284

answers:

2

! [rejected] master -> master (non-fast forward) error: failed to push some refs to '[email protected]:me/me.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes before pushing again. See the 'non-fast forward' section of 'git push --help' for details.

how can I merge remote changes?

+4  A: 

You probably have changes on github that you never merged. Try git pull to fetch and merge the changes, then you should be able to push. Sorry if I misunderstood your question.

Jorge Israel Peña
In case you need to reject changes in the remote master and push your own changes, try to push with -f key
Hotsyk
+8  A: 

See the 'non-fast forward' section of 'git push --help' for details.

You can perform "git pull", resolve potential conflicts, and "git push" the result. A "git pull" will create a merge commit C between commits A and B.

Alternatively, you can rebase your change between X and B on top of A, with "git pull --rebase", and push the result back. The rebase will create a new commit D that builds the change between X and B on top of A.

Thilo