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

Gunjan Arya Jul 08, 2012

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.

3 answers

1 accepted

3 votes
Answer accepted
Jobin Kuruvilla [Go2Group] Community Leader Jul 08, 2012

Have you committed your changes before pushing?

Gunjan Arya Jul 08, 2012

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
Jobin Kuruvilla [Go2Group] Community Leader Jul 08, 2012

Do git add first and then commit.

Like Amanda COSSU likes this
Gunjan Arya Jul 08, 2012

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.

Jobin Kuruvilla [Go2Group] Community Leader Jul 09, 2012

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

0 votes
ajkr195@gmail.com Dec 03, 2018

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.

ajkr195@gmail.com Dec 03, 2018

It getting sluggish like Microsoft Windows Everyday.

Praveen Kumar Jan 10, 2019
<p>bitbucket is not good anymore</p>
Like Nicholas likes this
Eros Marcus Zamora I'm New Here Feb 26, 2019

i face a lot of problems in bitbucket. fuck

0 votes
Vinh Nguyen I'm New Here Apr 28, 2019
git commit -m "initial commit"
git push origin master

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

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

3,372 views 3 22
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