EGit in Eclipse Installation and Import from GitHub

Egit is the easiest way to suck projects into Eclipse from places like GitHub.

1) Install EGit

Help -> Install New Software

Work with: http://download.eclipse.org/egit/updates-nightly/

Go to Collaboration and check the box labeled Eclipse EGit.  Don’t bother with any of the other EGit boxes.

Click Next-> Next  Accept the terms of the license and click Finish.

2) Use EGit to Import a Repository from GitHub

Go to File -> Import -> Git -> Projects from Git

Select “URI” and click Next.

For “Branch Selection” pick whichever branches you’d like.  I’m just going to pick the master branch.  Click Next.

When it asks me for a local destination, I’m going to set it to a directory under my htdocs because this is a web project.

In the next screen it says “Select a wizard to use for importing projects”.  I will select “Use the New Project Wizard” since the project I’m downloading doesn’t have any eclipse files associated with it already.  Click Finish.

Right after clicking the Finish button the “New Project” wizard will popup.  Since mine is a JavaScript project I’ll select JavaScript -> JavaScript Project and then click Next.

For the “Project name:” I’ll give it the same project name as the GitHub project.  Then I’ll select “Create project from existing source” and “Browse” to the “Directory:” I setup as my “Local Destination” above.  Finally I’ll click Finish.

Things that go wrong

1) Error Message: Plug-in “org.eclipse.egit.ui” was unable to instantiate class “org.eclipse.egit.ui.internal.repository.NewRepositoryWizard”

When I tried to create a new eclipse project I got this error.  From looking online, I found the fix was to download the latest binaries.  Originally I had installed EGit from “http://download.eclipse.org/releases/indigo”.  The latest binaries are available at

http://download.eclipse.org/egit/updates-nightly/

 

Speak Your Mind

*

DSCF0006