First, install git plugin on eclipse egit
Eclipse version Eclipse-java-helios-sr2-win32.zip (no corresponding Egit plugin was found in Eclipse3.3 version and cannot be installed)
Egit Plugin Address: http://download.eclipse.org/egit/updates
OK, then follow the next step by default installation to restart Eclipse after installation
Second, configure Egit in Eclipse
Preparation: Need to register account on https://github.com
Preferences > Team > Git > Configuration
The user.name here is where you registered your username on https://github.com.
User.email is the mailbox you bound on GitHub. You can configure User.Name here
Create a new project and submit the code to a local git warehouse
1, new project Git_demo, and new Helloworld.java class
2, the Git_demo project submitted to the local warehouse, the following figure
In this step, you successfully create a git warehouse. But the folder is in the untracked state (the symbol "?" in the folder). ), we need to submit code to the local warehouse, as shown below
OK, so the code is submitted to the local repository
Four: Submit the local code to the remote git repository
Preparation: Create a warehouse on https://github.com
Click "Create Repository", OK, so the warehouse on the GitHub is ready.
Note Create a good remote warehouse, click in, you can see an HTTP address, such as red box, this is your HTTP protocol remote warehouse address
The preparations are ready, so start submitting the code to the remote repository.
OK, so submit remote Git is complete, you can check the https://github.com to see if the code has been submitted
attention to the problem
If the first submission will be the first step: Create a local warehouse, called the local warehouse.
Step two: A local commit will commit the update to the local repository;
Step Three: Merge the server-side update pull to the local warehouse, and finally push the merged local warehouse to the server side so that a remote commit is made.
If the same reason is not first submitted
First step: Update the modified code commit operation to the local repository;
Step Two: Step three: Merge the server-side update pull to the local warehouse, and finally push the merged local warehouse to the server side