Eclipse submit code error: rejected –non-fast-forward solution

So to say that when eclipse uses git to submit code, it is necessary to pull first, then commit and push

The following error occurred when using Git to upload a project in Eclipse today:

Insert picture description here

By consulting the information, I found that it was a file conflict problem, that is, the file in the local and remote Repository caused a conflict. Re-check it and found that the ReadMe.txt file was added when creating the Repository, resulting in a branch with the local project. Not consistent.

Error: rejected –non-fast-forward

Cause of error
File conflict, the local code and the number of files in the remote repository are inconsistent (that is, there are files in the remote repository that do not exist in the local project) or the local project is not modified based on the remote repository code.

Solution
Update the code in the remote repository to the local, and then push to complete the code submission.

Published 111 original articles · won praise 2 · Views 3533

Guess you like

Origin blog.csdn.net/m0_38088647/article/details/103276357