EGit
This page provides an introduction on how to start using the EGit extension in the Eclipse IDE for software development.
Contents
Installing EGit in Eclipse
In the newer versions of Eclipse, the EGit extension comes already preinstalled. If this should not be so in your case you can install it as follows:
- in Eclipse go to Help › Install New Software...
- you can look in the "All Available Sites" drop down panel if EGit is existing there or add update site with the Add.. button
- enter this URI: http://download.eclipse.org/egit/updates
- choose the JGit and the Eclipse Team Provider and Finish the installation
Setting up EGit panels in Eclipse
To have the EGit panes available you might need to set the following up:
- go to Window › Show View › Others... and select under › Git at least Git Repositories and Git Staging
- additionally, it is helpful to add under › Team History
Here you can also find a video tutorial on integrating github with Eclipse including already an intro on how to clone a public github repository (see below).
Cloning an existing git repository
- go to github into the repository you wish to clone and copy the URI
- switch to the Git repository panel in Eclipse
- Clone a Git Repository button (in the window which opens up the copied URI should be already specified. If not, change this here)
- hit Next > and select the branch(es) you would like to clone (then hit Next >)
- specify where all your local git repositories sould be stored and press Finish
- once the cloned repository is visible in the Git Repositories panel, you can right click on it and choose Import Projects...
- choose Import as general project and press Next >
- specify the projects name and Next >
If the clones repository contains a Maven project, you can then right-click it in Eclipses' package explorer and choose Configure › Convert to Maven Project
Et voila, ready and all in Eclipse.
Video tutorials on EGit usage
Furthermore, you will find helpful how-to info for branching, staging, committing, pull- and push actions and merging repos in the following videos:
- Git Overview: Git & Eclipse
- Creating a Repository: Git & Eclipse
- Checking out an existing project: Git & Eclipse
- Making Changes: Git & Eclipse
- Pushing changes between repositories: Git & Eclipse
Surely, command line is for many things more flexible with all the attributes you can use for the commands, but it is easier for the beginning if starting without commandline experience.
Here is a neat (commandline related) interactive page which exlains the different levels of working with git repositories
UI alternatives to EGit
Here alternative user interface based git-related tools are listed.