References
1. http://www.linuxidc.com/Linux/2012-04/58985.htm
2. http://ihower.tw/blog/archives/2620
3. http://hi.baidu.com/lettoo/blog/item/e2e7f30fec72bdf6ab645789.html
Body
You can refer to document 3 to learn how to use git.CodeWhen uploading to git, the following error occurs:
Pushing to git@github.com: xwdreamer/firstrepo_xuwei.gitto git@github.com: xwdreamer/firstrepo_xuwei.git! [Rejected] Master-> master (non-fast-forward) error: failed to push some refs to 'git @ github.com: xwdreamer/firstrepo_xuwei.git 'hint: updates were rejected because the tip of your current branch is behindhint: Its remote counterpart. merge the remote changes (e.g. 'git pull ') hint: Before pushing again. hint: see the 'note about fast-forwards 'in 'git push -- help' for details.
I checked some information on the Internet. For details, refer to the content in reference 1. The reason is that the content in git is consistent with the local content. Fetch is required first, then merge is used, and finally push is uploaded. However, this operation is not performed. You can use force push to complete the operation, as shown in the following figure:
SelectForcibly overwrite existing branches (changes may be lost)And then Click Upload. the upload is successful.