1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues

Issues

Issue #3247 invalid

Getting an error when trying to push changes [git]

Samuel Marks
created an issue

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

!bash

$ git push Password: To https://SamuelMarks@bitbucket.org/SamuelMarks/toc-and-header-footer-extraction-from-pdfs.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://SamuelMarks@bitbucket.org/SamuelMarks/toc-and-header-footer-extraction-from-pdfs.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.

}}}

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.

Thanks,

Samuel Marks

Comments (3)

  1. Erik van Zijst staff

    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 http://book.git-scm.com/ is very good).

    This StackOverflow page describes your scenario in detail: http://stackoverflow.com/questions/5667476/git-non-fast-forward-rejected

    Hope this helps, Erik

  2. Log in to comment