Eclipse and github connection

1. Install the GIT plug-in EGit on Eclipse

Open Eclipse and find Help in the toolbar.
Insert picture description here
Click Add
Insert picture description here
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
Insert picture description here
then find Team->Git->configuration
Insert picture description here

Then click Add Entry to add information
Insert picture description here

Insert picture description here
Insert picture description here

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
Insert picture description here

Submit the git project to the local warehouse.
Insert picture description here
Insert picture description here
Click Create Repository
Insert picture description here
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
Insert picture description here
find Helloworld.java, then click the + sign in the upper right corner and
Insert picture description here
then click Commit and Push (add some words in the Message )
Insert picture description here

4: Submit the local code to the remote GIT warehouse

Preparation: Create a warehouse on https://github.com. After you
click new to
Insert picture description here
Insert picture description here
complete the creation, you can see an HTTP address at this time. This is the remote warehouse address of your http protocol. The
Insert picture description here
preparations are complete, then you can submit the code Go to the remote warehouse
Insert picture description here
. Fill in the remote warehouse address of your http protocol in the URI. After
Insert picture description here
filling in the information, click Add
Insert picture description here
and then click Finish.
OK, the remote GIT submission is complete, you can check whether the code has been submitted at https://github.com.
Insert picture description here
That's all, thanks for watching.

Guess you like

Origin blog.csdn.net/qq_49050617/article/details/108642700
Recommended