Eclipse installs Git plugin and associates import to GitHub project

Source: Internet
Author: User

First, eclipse configuration git

1. View your version of Eclipse

Open Eclipse

Navigation: Help->abouteclipse

2. Check if the Git plugin is installed in eclipse

Menu bar Help-Abouteclipse to see if there is a git plugin icon.

Now the eclipse download generally provide git plug-ins, if there is no git plug-in, you can search the eclipse market inside the Egit plug-in installation, if the low version of Eclipse installed high version of the Egit plugin will be error, it is recommended to either install the lower version, Or go to Eclipse's official website to download a new eclipse for Java EE, not much more than 200 m.

Note: The Egit plugin found in general market is suitable for the latest version of Eclipse, so it is recommended

Open First (Http://wiki.eclipse.org/EGit/FAQ#Where_can_I_find_older_releases_of_EGit.3F)
This page provides the corresponding version of the Egit, choose the appropriate version.

And then

Help->install New Software->add

Then just keep on going and you'll be ready to restart eclipse after the installation, and the Ok,git plugin will be installed.
3 Configuring Git

menu Bar Window->preferences, Team---Git Configuration, click Add Entry ..., add name and email, Name and email messages are required to commit the project code to git. In the Click AddEntry ... Pop-up dialog box, key fill User.name,value fill in the name information, this is to add name information, when adding email information, key fill User.email,value fill in the email address. Configure effects

Third, associated Gihub account
1. Login to GitHub

Go to the GitHub page (http://github.com), sign in with your GitHub account, and register if you don't have a GitHub account.
After logging in to GitHub, click the Newrepository button in the lower right corner to add the project code warehouse.
Enter repository name (suggested with the name of the project to be submitted), Description (a little description of what this project is doing), choose public (private charges, public free, However, the corresponding published project code can be viewed by anyone, and finally click Create Repository, the project code warehouse is created.
Specific git and GitHub recommended a series of tutorials on Liao Xuefeng's boring

2. Create a Java project
Build a Java project. menu bar File--New Java project, enter project name, enter Java here, click Finish.

Create a class file. Move your mouse over the Java Project Src folder, right-click, New-Class, fill package and name, and if you need to include the main method, you can tick the public static void main (string[] args), Click Finish to complete.

3. Associating git
Associate git after writing the appropriate code. Select the item you want to publish, right-click, Team---Share project, choose Git, click Next. Tick the use or create repository in parent folder Ofproject, select the item you want to publish, click Create Repository, and click Finish.
Publish the project. Select the item you want to publish, right-click, Team---commit, fill in commitmessage, tick Select all, click Commit. Note: At this point, only commit to local git and push is required to submit to GitHub.

"There is no stages files" appears when using Ecplise git commit

Solution into window--preferences--team--git--committing, reverse Select the Red circle section:


4. Post to GitHub
Posted to GitHub. Select the item you want to publish, right-click, Team---Remote, Push, paste Uri, fill in user and password, click Next, click the drop-down box for source ref, select Mast, click Add Spec, Click Finish and click OK to finish.
Post the GitHub project page, you can easily see the number of submissions, each time the submission of notes information, etc., very convenient for the management of the code.

5.Eclipse Importing GitHub projects
Get the project code from GitHub. menu Bar window, Show view, git-gitrepositories, click OK; in 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 you want to save, click Finish. At this point, the project code is downloaded to the specified directory, and needs to be used when it comes in through eclipse import.

Eclipse installs Git plugin and associates import to GitHub project

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.