Troubleshoot using github to reject uploading code issues

Source: Internet
Author: User

Problem Description:

[rejected] master, Master (Non-fast-forward) error:failed to push some refs to ' git@github


when you upload the code, you can upload a good, but suddenly this appears as a problem. Now let me show you how to solve the simple and easy-to-operate scenario:


First step: Find the source of the error

(1) Open the Git Gui (the visual interface of Git) as shown below and click on the merge that the icon points to.


Click on the local merge inside


(2) A dialog will pop up at this time, as shown below: Follow the icon to indicate the operation




(3) After completing the above two clicks, the following image will appear, in the non-cached changes listed in the file must be removed.



Step Two: Remove Files

(1) Right-click on the git Bash (git command Window) in the local repository and use git rm-r file name (mentioned above to delete files). For example, there are two non-cached folders Day01 and day02, the Delete command for git rm-r day01 Click Enter, then type git rm-r day02 and return. This way, the files that are not cached are deleted.


after doing the above, you can test the upload, git push, you can succeed


here also has an article, is writes the upload cannot succeed, encounters the question, recommends to everybody to look


Links: http://blog.csdn.net/chain2012/article/details/7476493




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.