Home git What to do when Updates were rejected because the tip of your...

What to do when Updates were rejected because the tip of your current branch is behind its remote counterpart

Author

Date

Category

I git push and I get the following error.

To [email protected]: name / project.git
  21b430d..dd378ca master - & gt; master
 ! [rejected] release - & gt; release (non-fast-forward)
error: failed to push some refs to '[email protected]: jkubicek / my_proj.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. If you did not intend to push that branch, you may want to
hint: specify branches to push or set the 'push.default' configuration
hint: variable to 'current' or 'upstream' to push only the current branch.

as I understand it, except

git push https: //[email protected]/visit/visit.0.11.git

there you can also specify your branch, how should you specify it?


Answer 1, authority 100%

To be sure, make the current branch the default (so as not to miss when pushing):

git config --global push.default current

Then return it back to the master. And don’t forget to fetch changes from branches via git fetch

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions