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

I cannot push new refs to online repository from local repository

Dhanunjaya Kammara March 3, 2020

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
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2020

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
AUG Leaders

Atlassian Community Events