! [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' in 'git push --help' for details.
Problem Description
Common causes : When we find a problem in github repository, you carried it on github online modifications; or you add a readme file, or other files directly on github in a library, but there is no local library synchronization. This time the problem push failure occurs when you want to submit again commit to the remote github repository from the local library.
Using the command: git pull --rebase Origin Master
This instruction means to update the remote repository merged into the local library, -rebase role is to cancel the local library just commit, and to bring them back after update among the versions of the library.
Here I used the wrong case diagram to explain the occurrence of image and resolution
git pull -rebase origin master intended to cancel commit record, and save them as a temporary patch (patch) (these patches into the ".git / rebase" directory), and then synchronize the remote to the local library, and finally merge the patch into the local among the library.
Then you can push the local repository to the remote library among the.
Most excerpt network