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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Got This error when trying to push my file to repo

I'm following a book about Django and when I'm trying to push my file to Bitbucket repo , I got this error : I wrote in cmd:

git init 
git status
git add -A
git commit -m "comment"

-Creating a account in Bitbucket

in cmd:

git remote add origin
git push -u origin master

I received this Error:

! [rejected] master -> master (non-fast-forward) error: failed to push some refs to '' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

1 answer

1 vote
Tyler T Atlassian Team Jul 29, 2019

Hi and welcome to the Community.

The error explains what is happening. You need to pull down changes from the remote before pushing your local changes. When you created the repo in Bitbucket, it may have created a README which would be the first commit of the git repo.

# pull changes from the remote origin
git pull

# view the commit log
git log

# if the log looks okay
git push -u origin master

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in DevOps

Step up your DevOps game webinar Q&A series - Questions answered!

  On October 21st, 2020 we hosted a webinar titled,   Step Up You DevOps Game with 4 Key Integrations for Jira and Bitbucket. We had a great showing and high engagement, but that meant th...

101 views 0 1
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