Skip to main content

Import Git Project into Eclipse


Third article of Eclipse IDE Plugins is about importing a Git project into Eclipse using EGit. This is useful when working with such project that are placed in public places such as GitHub or if you are working on project which has many developers.

To follow this tutorial you have to have Eclipse installed on your operating system and EGit. If you haven’t installed EGit, you can follow the first Eclipse tutorial which shows how to install an Eclipse Plugin.

You also have to have configured EGit which I have shown on the second Eclipse tutorial.

Importing a Git Project into Eclipse #

Start Eclipse and go to the File menu and choose Import.

EGit Menu

Git Project #

Surf in the Import menu to Git and select Projects from Git

EGit Projects From Git


Depending on the situation, but on this tutorial I will show you the way for URI. So choose URI at this point.


Configurations #

Here you see example data how to write the configurations, I’m using ssh as a protocol as it is most widely used. Click next when you are done editing and Eclipse will try to connect and fetch for Git repository.

EGit Configurations

Repositories #

Depending on the found Git repositories, you will see the repositories here.

EGit Repositories

Directory #

Next we choose the directory where to place our local Git repository. I use the default one.

EGit Directory

Importing to Eclipse #

Eclipse asks how would you like to import the project. The usual way for Eclipse projects is to import it as an existing project.

EGit Import

Just select here the project you are importing and Eclipse imports the project.

EGit Import

Importing Finished #

Now if we go right click our imported project and go to Team we will see all the important Git functions.

EGit Finished

Using EGit #

You can get around with these commands in the world of Git and Eclipse, if you get some special needs, I’m sure you will find answers pretty fast with some Googling.

I hope these Eclipse Plugins tutorials have been helpful and maybe you have learnt how to use Git, it’s a very good tool in version controlling and preventing disasters in software development. Of course there are some bad things but you will eventually find those yourself.