Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Problema when try push local repository to remote - git

When I run  git push origin <branch>

I have the error bellow:

$ git push origin <branch>
! [rejected] <branch> -> <branch> (non-fast-forward)
error: failed to push some refs to ''
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.


When I run: git remote show origin


Local refs configured for 'git push':
<branch> pushes to <branch> (local out of date)



4 answers

1 accepted

Thanks for all the comments and help.

What happened was that there was commits in the remote master/origin.

Then I had to merge it into the branch I was working on. I did this by bitbucket website.

Locally I had to type the command: git branch --set-upstream-to=origin/<branch-name(remote)> <branch-name(local)>


Then, I could run push without problems.

Your branch is behind the upstream branch. Try doing:


git pull


and then do your push.

Thanks for your answer.

I already tryed git pull. But still have the issue.



You try to execute this command:


git push -f origin <branch>



Suggest an answer

Log in or Sign up to answer
Community showcase
Published in DevOps

Step up your DevOps game webinar Q&A series - Questions answered!

  On October 21st, 2020 we hosted a webinar titled,   Step Up You DevOps Game with 4 Key Integrations for Jira and Bitbucket. We had a great showing and high engagement, but that meant th...

101 views 0 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you