Because the commit was just a few days into the merge, and then there was an error in the push code:
$ Git push-u origin update-docs (branch name)
To Git@github.com:******/demo.git
! [Rejected] Master-> Master (Non-fast-forward)
Error:failed to push some refs to ' git@github.com:******/demo.git '
Hint:updates were rejected because the tip of your current branch is behind
Hint:its remote counterpart. Merge the remote changes (e.g. ' git pull ')
Hint:before pushing again.
Hint:see the ' about Fast-forwards ' in ' git push--help ' for details.
Online search, because the remote repository and my local repository conflict caused, and I created a version of the library, in the GitHub version of the library page clicked on the Create Readme.md file button to create a description document, but not pull to the local. This creates a problem with version conflicts.
There are several solutions:
1. Use the forced Push method:
$ Git push-u origin uodate-name-f
This can make remote modifications lost, generally undesirable, especially when many people collaborate on development.
2.push before the remote repository modified pull down
$ GIT pull Origin Update-docs
$ Git push-u origin Update-docs
3. If you do not want to merge remote and local modifications, you can first create a new branch:
$ git branch [name]
and push.
$ Git push-u origin [name]
I feel the second method is the best solution, and the third