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