EGit is the Git plugin for
Eclipse. It's use is not very intuitive, so we
provide instructions here on how to install and use it for the purposes
of our projects.
Installation of EGit is generally done through Eclipse. Because of this,
the steps may vary, depending on which version of Eclipse you installed.
Generally, run Eclipse (if you don't already have it running), and go to
Help > Install New Software (or Help > Software Updates). In older
versions of Eclipse, you may then need to click the Available Software
tab.
In the Work With box, select what should probably be the only option
listed, named something like "Indigo -
http://download.eclipse.org/releases/indigo" or whatever your Eclipse
version is named. Give it a moment to update the list of software.
At this point, you can either scroll down to find the "Collaboration"
section, or else, in the search bar (between Work With and the software
list), type "EGit" and press enter, then give it a good moment to update
the list and find items by that name. You'll probably see the
"Collaboration" section as the only item listed.
Expand Collaboration (or whatever sections it finds), and find one named
"Eclipse EGit", and check it. You do *not* want stuff with Mylyn in
its name unless you know for a fact that you have Mylyn installed (even
if you do have it installed, it does not hurt to keep them deselected,
it just means that Mylyn won't be able to add special mylyn features to
EGit).
Click Next, and follow the rest of the wizard. Agree to the license,
etc. Feel free to let Eclipse restart itself after it's done.
Now, assuming no errors popped up, you should have EGit installed and
ready to use.
To checkout (clone) a project once you have EGit installed, follow these
steps. You will need the repository's HTTP URI to its git file, which
you can usually obtain by visiting the repository. For example, github
projects will usually have a URI of the following form:
https://github.com/Owner/Project.git
Note 1: These instructions are only designed for Java
projects. For non-java projects, you are on your own. Try consulting the
building instructions for the non-java project instead. Notably, step 5
(and substeps) will differ.
Note 2: This will create a valid git directory which you may interact
with using git via command line if you do so desire, so checking out via
command line is entirely unnecessary.
If you make changes to the project with the command line (e.g. with
command-line git), Eclipse might not recognize them right away. This can
easily be resolved by Refreshing the project (Right click on the
project, and click Refresh. F5 is the shortcut key, so you can
alternatively simply click on the project and press F5).
<references></references>
Wiki: Eclipse
Wiki: Egit
Wiki: Java
Wiki: LateralGM:Developing