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,293,681
Community Members
 
Community Events
165
Community Groups

Why I cant push my new project and getting error: failed to push some refs to ..........etc error

Chethan V I'm New Here May 18, 2022

Hi I am new to source tree and trying to push my game to bitbucket using source tree. I created a local repository and connected that with my remote repository. But when I try to push it , I am getting the following errors:

 

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags --set-upstream origin master:master
Pushing to https://bitbucket.org/chethanv_7/flappy-universe-7.git
Uploading LFS objects: 100% (300/300), 19 MB | 356 KB/s, done.
To https://bitbucket.org/chethanv_7/flappy-universe-7.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://bitbucket.org/chethanv_7/flappy-universe-7.git'

hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first 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.

 

You can find the screenshot of the error. How can I overcome this source tree error.png

1 answer

0 votes
Craig Nodwell Community Leader May 18, 2022

Hi @Chethan V welcome to the community.
Your local repo and remote repo are out of sync.
There are changes in the remote repo that are not in your local.
You must get those remote changes into your local repo prior to pushing.
Do a pull on the remote repo then redo your push.

I tried to pull but got the following error @Craig Nodwell 2022-05-18.png

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Bug Fix: Sourcetree for Windows authentication error when updating to app password

Hello Sourcetree users!!! With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for se...

60,341 views 127 26
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