Getting an error when trying to push changes [git]

Issue #3247 invalid
Samuel Marks
created an issue

Unfortunately I am getting an error when trying to push my commit's to my bitbucket repository: {{{


$ git push Password: To ! [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.


This is a very important push, and I need it to go through.

Please tell me what I can do on my end, or if you've done what's required on yours.


Samuel Marks

Comments (3)

  1. Erik van Zijst

    Hi Samuel,

    Bitbucket rejects your push, because it would delete history on our side. What happened is that your local clone is not in sync with your Bitbucket repository. Maybe someone else has pushed to it, or maybe you rebased locally. Pull first and then push again.

    Have a look at the documentation it suggests. It explains these scenarios.

    Alternatively you can have a look at some of the excellent books that are out there (the Git Community Book is very good).

    This StackOverflow page describes your scenario in detail:

    Hope this helps, Erik

  2. Log in to comment