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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,464,971
Community Members
 
Community Events
176
Community Groups

Can't push changes to Bitbucket

I'm trying to push some minor changes up to Bitbucket with my normal Sourcetree workflow but am getting this error:

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags --set-upstream origin master:dev/gm/AddDefaultStateSequence
Pushing to https://bitbucket.org/Gene_M/cpf_h7a3.git
To https://bitbucket.org/Gene_M/cpf_h7a3.git
= [up to date] pre-rearchitecture-checkpoint -> pre-rearchitecture-checkpoint
! [rejected] master -> dev/gm/AddDefaultStateSequence (non-fast-forward)
error: failed to push some refs to 'https://bitbucket.org/Gene_M/cpf_h7a3.git'

 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.


Completed with errors, see above.

I was able to commit the changes but the push failed.  As far as I can tell I'm using the same process I've always used, but for some reason that I can't figure out, it isn't working this time.  I've tried using git bash and get the same error.  Any suggestions will be greatly appreciated.  Thanks

1 answer

0 votes
Syahrul Atlassian Team Jan 08, 2023

Hey @Gene_M

G'day.

Based on the error message, it looks like your local repository copy is outdated.

This happens when there's a new commit in the branch you are working on the remote repository that you don't have the copy locally. So git rejected your push because of this.

The workaround is to do a git pull to ensure your local repository copy is updated with the latest changes.

Cheers,
Syahrul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events