A bug in git push

Source: Internet
Author: User

I have failed when I push my local branch to the remote repository, and the error message is:

$ GIT push origin master
to [email protected]:xiaxiaosheng/androidremotectrl_client.git
! [Rejected] master, master (Non-fast-forward)
Error:failed to push some refs to ' [email protected]:xiaxiaosheng/androidremotectr
L_client.git '
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 ' "Git push--help ' for details.

Today finally Baidu to the solution, is said to be because of their own version of the branch is lower than the main version, but the specific meaning I still need to be verified.

But the problem is successfully solved: push when the next add a parameter-F to be able, meaning to force the local code push to overwrite the remote repository, as follows:

$git Push-u Origin Master-f

And then snapped my code up.

A bug in git push

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.