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:
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.