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

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

Chethan V
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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.

Chethan V
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 18, 2022

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

Atlassian Community Events