MyEclipse Integrated Egit Graphics tutorial

Source: Internet
Author: User
Tags git client

This version management tool is sure to be integrated in the IDE to use it more convenient, after all, usually developed in the IDE. So it is necessary to learn to install a git plugin in myelipse.

Of course, it is also important to master git content and common commands, so you can go to the official website of Liao Xuefeng Feng to see the git tutorial, you can directly point the portal.


For this article first outline here, I hope you have a general understanding of the process:

1. Install the GIT client

2. Apply for GitHub account

3. Install Eclipse plugin Egit

4, Configuration Egit

5. Build a local warehouse

6. Add a remote repository


The first and second steps are skipped here, because it's easier to believe that it's hard not to fall into a procedural ape.


Installing the Eclipse plugin Egit


It is necessary to note that the Egit version needs to be used in correspondence with the MyEclipse version, and if the version is incorrect, an error will be made, similar to the following:



The correspondence between Egit and Eclipse versions is as follows:



For the myeclipse we use, we also need to find the version of Eclipse that corresponds to the MyEclipse version. Don't be nervous, here's an easy way to do this: just find the Readme directory in the MyEclipse installation directory, and then open the readme_eclipse.html file inside to see it, like my myeclipse. 8.6 The corresponding Eclipse version is 3.5.2 so you can choose the corresponding version of the egit, I choose 1.3.0, the following simple installation can be seen in the windows--"preference--" team option to see git:



Configure Egit

This means that Egit has been installed, the following start configuration Egit, but in advance is your computer to install a git client, you can go to the GIT website to download the latest version of the corresponding operating system.


Choose the repository path for your git client, which you can choose as your git repository path, and then clone all the projects you need to manage with git to this directory for unified management. Then open the configuration:




Here you can see that it automatically reads the. gitconfig file in the user directory, which you can skip if previously configured in Git. Otherwise you will need to set up user and email here

New entry--"Add User.Name and User.email to


Set up a local repository this is where the plug-in configuration ends. Here's an attempt to start creating a project:



Right-click Project--"team--" Share project

This will pop up a dialog box, to the effect that the environment variable is not configured home, the user configuration information and warehouse will be present in the following directory (usually the user directory), if you want to change the words to set the environment variable home, we ignore it, choose git--"Next




Click Create, the popup dialog box defaults to the directory you just configured in the configuration, then fill in the project name and click Finish:




At this point the corresponding warehouse has been specified, then click Finish to complete the establishment of the warehouse, you can see that the MyApp project already has version information:




We can right-click the project--the Team sees a lot more options similar to SVN version control:




At this point we click Commit to submit the file:



After filling in the notes, click Commit to submit the project to the local repository. You can see that the contents of MyApp are already consistent with the local repository.


Add a remote repository

However, at this time the warehouse is local, if you want to cooperate with the small partners to develop or prevent project loss, then you can associate the local warehouse to a remote warehouse, here will have to mention an artifact of the site--github.

First go to GitHub to apply for an account, and then create a warehouse (here we call MyApp), these are not illustrated, or relatively simple, because your local git warehouse and GitHub warehouse between the transfer is encrypted by SSH, so, need a bit of setup:

1th step: Create SSH Key. In the user home directory, see if there is no. ssh directory, if there is, then look at this directory there are no id_rsa and id_rsa.pub These two files, if already have, can jump directly to the next step. If not, open the shell (open git Bash under Windows) and create SSH Key:

$ ssh-keygen-t rsa-c "[Email protected]"

You need to change the email address to your own email address, and then return to the default value, as this key is not used for military purposes, so there is no need to set a password.

If all goes well, you can find it in the user's home directory.. SSHdirectory, Inside thereId_rsaAndid_rsa.pubTwo files, these two are key pairs of SSH key,Id_rsaIt's a private key, you can't leak it.id_rsa.pubis a public key that can be safely told to anyone.

2nd step: Login to GitHub, open "Account Settings", "SSH Keys" page:

Then, click "Add SSH Key", fill in any title, paste the contents of the id_rsa.pub file in the Key text box:


This allows you to clone and push the code on the GIT client. But in the myeclipse, you need to set it up again:

SSH2 This option is found under window--"preferences:



The directory here is set to the directory of the SSH key that was just generated, and then click the Key Management tab:




This imports the private key that was just generated, which is the Id_rsa file. Then click apply--"OK." Here's a quick explanation, remember when we filled out the public key on the GitHub website? Now the private key is imported, then when we push the GIT server can authenticate to your identity with the private key, only need to use the public account git.

Then we push the project from the local warehouse to GitHub, and the mail item--"team--" remote--"push




Need to fill in the remote library address and other information, directly to the newly created remote warehouse SSH address to paste up, protocol select SSH:




Click Next on the following page to add all the files under branch and tag to the push:



Last point next--"Finish, if not an accident, you can see there will be a push result~

Go to the warehouse on your GitHub and see if the local files have been sent up. If it is, then congratulations on your success ~ if not, then please study carefully again



MyEclipse Integrated Egit Graphics tutorial

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.