First, install the Git plugin on Eclipse egit
Egit Plugin Address: http://download.eclipse.org/egit/updates
OK, then the next successive default installation will be ready, after installation to restart Eclipse
Ii. Configuring Egit in Eclipse
Preparatory work: Need to register an account on https://github.com
Preferences > Team > Git > Configuration
The user.name here is your registered user name on the https://github.com.
User.email is your mailbox on GitHub. Configure the User.Name here
III. Create a new project and commit the code to a local git repository
1, new project Git_demo, and new Helloworld.java class
2. Submit the Git_demo project to the local warehouse, as
In this step, the Git repository is created successfully. But the folder is in the untracked state (the symbol "?" in the folder.) ), we need to submit the code to the local repository, as
OK, so the code is submitted to the local repository
IV: Commit The local code to a remote git repository
Getting ready: Create a warehouse on https://github.com
Click "Create Repository", OK, so the repository on GitHub is created.
Note After creating the remote repository, click to go in, you can see an HTTP address, such as the red box, this is the remote Warehouse address of your HTTP protocol
The preparation is done, so start submitting the code to the remote repository.
OK, so commit the remote git is done, you can check the https://github.com in the code has been submitted
The problem of attention
If this is the first time to commit, start by building the same warehouse locally, called the Local warehouse.
The second step: Commit locally commits the update to the local repository;
The third step: Pull the server-side updates to the local warehouse for consolidation, and finally push the consolidated local repository to the server side, so that a remote commit is made.
If the same goes for a non-first-time submission
The first step: Update the modified code commit operation to the local repository;
Step two: The third step: Pull the server-side updates to the local repository for consolidation, and finally push the consolidated local repository to the server side .
Git plugin configuration Editor in eclipse