use git in eclipse

1. First determine whether eclipse has installed a git plug-in, if not, install it.

2. Configure git information: menu bar Window ->Preferences -> Team -> Git -> Configuration, click AddEntry..., add name and email, you need to use name and email information when committing project code to Git. In the dialog box that pops up by clicking AddEntry..., fill in user.name for Key and name information for Value. This is to add name information. When adding email information, fill in user.email for Key and email address for Value.

3. Associate Git: Team -> Share Project, select Git, and click Next. Check Use or create repository in parent folder of project, select the project to be published, click Create Repository, and click Finish to complete. 

4. Commit the project to the local: Select the project to be published with the mouse, right-click, Team -> Commit,
remember to fill in the Commit message, select all, and click Commit to submit.

5. Publish to GitHub: Team -> Remote -> Push, paste the URI, fill in the User and Password, and click Next; click the drop-down box of Source ref, select master, click Add Spec, click Finish, and click OK.

6. Eclipse imports the GitHub project: Window -> Show View -> Git -> GitRepositories, click OK;
in the Git Repositories view, click the icon button to enter the Clone Git Repository dialog box;
Fill in URI, User, Password, click Next; click Next; select the path to save, click Finish.
At this point, the project code has been downloaded to the specified directory, and you can import it through Eclipse Import when you need to use it.

Guess you like

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