Error message:
[Email protected]/k/cocos2d/yc (master)
$ Git push-u Origin Master
to [email protected]:yangchao0718/cocos2d.git
! [Rejected] master, master (Non-fast-forward)
Error:failed to push some refs to ' [email protected]:yangchao0718/cocos2d.git
Hint:updates were rejected because the tip of your current branch is Behin
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.
The main reason for this error is that the readme.md file in GitHub is not in the local code directory
You can merge the code with the following command: Pull=fetch+merge
Git pull--rebase Origin master
After executing the above code, you can see that the local code base has more readme.md files
Now execute the statement GIT push-u Origin master to complete the code upload to GitHub
It's OK.
Git with git push appears failed to push some refs to git ... The workaround