1. Install the GIT plug-in EGit on Eclipse
Open Eclipse and find Help in the toolbar.
Click Add
EGit plug-in address: http://download.eclipse.org/egit/updates
Continue to install by default in the next step, and then restart Eclipse.
Two, configure EGit in Eclipse
First you have to register an account on github (https://github.com),
then find Preferences in Window in the toolbar and
then find Team->Git->configuration
Then click Add Entry to add information
Here user.name is your registered user name on github.
Here user.email is your registered email address on github
3. Create a new project and submit the code to the local GIT warehouse
Create a new project git, and create a new Helloworld.java class
Submit the git project to the local warehouse.
Click Create Repository
to this step, and the GIT warehouse will be successfully created. But the folder is in an untracked state (the symbol "?" in the folder indicates), we need to submit the code to the local warehouse to
find Helloworld.java, then click the + sign in the upper right corner and
then click Commit and Push (add some words in the Message )
4: Submit the local code to the remote GIT warehouse
Preparation: Create a warehouse on https://github.com. After you
click new to
complete the creation, you can see an HTTP address at this time. This is the remote warehouse address of your http protocol. The
preparations are complete, then you can submit the code Go to the remote warehouse
. Fill in the remote warehouse address of your http protocol in the URI. After
filling in the information, click Add
and then click Finish.
OK, the remote GIT submission is complete, you can check whether the code has been submitted at https://github.com.
That's all, thanks for watching.