git plugins for eclipse and netbeans

Main menu:

Topics

Recent Posts

Feeds

RSS Feed RSS - Posts

December 2010
M T W T F S S
« Nov   Jan »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Past Posts

Java/Java EE

JDBC

Other

git plugins for eclipse and netbeans

December 5th, 2010 by Jeanne Boyarsky

Last year, I tried out Git for the first time.  The command line was fine, but I really like my version control to be integrated into my IDE.

Overview

Git shines at some things.  Aside from the common ones, it is useful when internet access is unreliable.  We take connectivity for granted.

NetBeans

I hadn’t tried the NetBeans plugin last year. I mainly use Eclipse and only use NetBeans when working with a local robotics team. As such, I haven’t used NetBeans in eight months and needed to update it before I could try installing the NetBeans Git plugin.

Note: This Git plugin is in experimental mode. It will likely stay there as Oracle is working on an official plugin. Check Oracle’s page for updates. (Nice to see they didn’t abandon NetBeans after taking over Sun.)

The install procedure to connect to an existing repository:

  • Tools > Plugins
  • Select available plugins tab
  • Search for git
  • Click checkbox next to nbgit
  • Click install
  • Next and agree to license
  • Install
  • Continue to acknowledge it isn’t a signed/trusted plugin
  • Finish
  • Close
  • Team > Clone Other
  • Enter URL of git://github.com/prog694/frc
  • Enter directory/clone name if want to change. I had to change the clone name since the default was in use from last year’s Subversion project.
  • NetBeans looks for projects in that repository. I got a pop-up saying 7 projects were found and was asked to click “open project.” Select one or more projects to open them.

Eclipse

I tried egit again. This didn’t go well last year.  It’s now a year later and I’m on Eclipse 3.6 (Helios) instead of 3.5.  Things went much better this time around.

The install procedure to connect to an existing repository:

  • In Eclipse, connect to the update site.
  • Download all available plugins (egit and jgit).
  • Eclipse restarts
  • Change to the Git browsing perspective
  • Choose “clone Git repository”
  • Enter the URI.  In my case it was git://github.com/prog694/frc.  Note this same repository is available in a browser at https://github.com/prog694/frc.  All I did was change the protocol to git to connect. 
  • Since this repository is open for public browsing, I do not need to supply a username and password
  • Click next
  • Click next again to select the master
  • Click finish
  • Wait a minute or two
  • Expand until you find the project you want to checkout. (In this case, the actual project is a NetBeans project in this case so you can’t check it out as a project.  You can browse it in the repository view if you really want to check something.)

Conclusion

Both plugins are intuitive to use if you’ve a CVS/SVN plugin before.  Right click the project, choose “git” and the relevant option.  It’s nice to see the integration is seamless now.

Comments

Comment from ehsavoie
Posted: December 12, 2010 at 2:53 pm

There is an ‘official’ netbeans plugins for git now (but it is not as advanced as nbgit) which should be available with Netbeans 7.0

Write a comment