You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.