When I run git push origin <branch>
I have the error bellow:
$ git push origin <branch>
! [rejected] <branch> -> <branch> (non-fast-forward)
error: failed to push some refs to 'https://email@example.com/folder.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and 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.
When I run: git remote show origin
Local refs configured for 'git push':
<branch> pushes to <branch> (local out of date)
Thanks for all the comments and help.
What happened was that there was commits in the remote master/origin.
Then I had to merge it into the branch I was working on. I did this by bitbucket website.
Locally I had to type the command: git branch --set-upstream-to=origin/<branch-name(remote)> <branch-name(local)>
Then, I could run push without problems.
Across the world, governments and healthcare authorities are demonstrating the power of collaboration to find solutions to the COVID-19 pandemic, to protect our communities, and to get things back to...
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