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

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

I cannot push new refs to online repository from local repository

I am getting this error message

 

! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://Dhanu36@bitbucket.org/Dhanu36/git-test.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

 

 

1 answer

0 votes

Hello @Dhanunjaya Kammara,

Welcome to the Community.

This error means that the branch you're trying to update (master) has been updated by someone else since the time you last fetched its state. So basically, your "state" of that branch is older (or behind, in other words) its state in the remote repository (on Bitbucket).

You have several options at this point, but there's no universal recipe: the strategy to resolve this situation depends on the way you and others work on the repository and obviously on what changes have been applied externally. Please see this article to learn more about different strategies of pulling changes from remote repository.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Bitbucket

How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features on how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your t...

160 views 0 2
Join discussion

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