The use of egit plugin under Eclipse

I have been in touch with GIT for a long time, but the companies I encountered have been using SVN and refused to switch to GIT for various reasons. I changed my job this year, and took advantage of the opportunity to build a new framework and project for the company, and finally used GIT on a formal project. The GIT server uses https://gitee.com/ directly, which saves you building and maintaining it yourself. Eclipse, the client tool of git, provides the egit plug-in by default. It was a bit awkward to use at first, and it felt inferior to the command line, but after groping, it was used.

Case 1:  "rejected-non-fast-forwad" error in the push report: Solution: It was found that the code was not submitted to the remote GIT server, maybe the last Commit was only submitted to the local GIT server, then through "push to upstream" Submit from the local git repository to the remote.

Case 2 : During the pull, a conflict is reported: Resolution process: Enter the Synchronize view to see where the conflict occurred. After resolving the conflict, you will find that the conflicting file still exists in the Synchronize view, and a conflict will still be reported during the pull. The reason for this is that when the first pull was made, the code changes in the project had not been submitted (the local git repository was not submitted), and this file had also been modified differently by others and was preemptively submitted to the remote by others. In the GIT warehouse, at this time, since the local git warehouse does not conflict with the remote git warehouse, the local warehouse has been updated by the pull. This conflict is only the conflict between the code on the project project and the local git repository, so after resolving the conflict on the synchronous view, commit to the local repository and then do a pull again.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324768000&siteId=291194637