It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

git push origin not working

When I try the command $ git push origin I get the message "Everything up-to-date" but when I check my repository in Bitbucket I see the new verion of the code is not uploaded and there are no cahnges.

Please help me out. I am new to this.

5 answers

1 accepted

Have you committed your changes before pushing?

Yes I used the below commands:

$ git commit -m "Jul 8 update"
$ git add .
$ git push origin master
I got the message Everything up-to-date
Like Malek K. likes this

Do git add first and then commit.

Like # people like this

Thanks Jobin. I got your point and it worked to some extent. However, on doing the commit I recevied the following messages and it is still not getting pushed to the repository.

gunjan@Niyamgiri:~/tribalrights$ git push origin masterTo ssh://git@bitbucket.org/niyamgiri/tribalrights.git

! [rejected] master -> master (non-fast-forward)

error: failed to push some refs to 'ssh://git@bitbucket.org/niyamgiri/tribalrights.git'

To prevent you from losing history, non-fast-forward updates were rejected

Merge the remote changes (e.g. 'git pull') before pushing again. See the

'Note about fast-forwards' section of 'git push --help' for details.

---I also tried the below command --

gunjan@Niyamgiri:~/tribalrights$ git push -u origin --allTo ssh://git@bitbucket.org/niyamgiri/tribalrights.git

! [rejected] master -> master (non-fast-forward)

error: failed to push some refs to 'ssh://git@bitbucket.org/niyamgiri/tribalrights.git'

To prevent you from losing history, non-fast-forward updates were rejected

Merge the remote changes (e.g. 'git pull') before pushing again. See the

'Note about fast-forwards' section of 'git push --help' for details.

Like Nilesh Chatre likes this

Looks like somebody pushed changes to the repository after you pulled from it. Try pulling again, merge changes, resolve conflicts, commit and push again.

same problem with me.... fuck 

trying from 2 days but still not working...

i have to upload my files to my new repositary..

but i can't upload it..

the error is still there in git bash.

Bitbucket is getting uglier everyday. The most lethal combination is Spring STS and Bitbucket. 

Bitbucket will fail you whenever you need it the most without any good reason.

It getting sluggish like Microsoft Windows Everyday.

<p>bitbucket is not good anymore</p>
Like Karl Nicholas likes this

i face a lot of problems in bitbucket. fuck

Like Issac Nguyen likes this
git commit -m "initial commit"
git push origin master

For some reason when I did this it worked...  

0 votes

I solved problem with command:

 git pull --allow-unrelated-histories

Make sure that you add  files

git status 

git add .

git commit 

git push 

 

I had the same problem I solve it by this way. Hope it will work 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

Contest: Share your custom Bitbucket Pipe and win

Announced in this blog, this holiday season we’re celebrating all things CI/CD and between now and the end of 2019 we’ll be showcasing content, use cases, feature announcements and more. One featur...

1,137 views 5 4
Join discussion

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