Saturday, September 3, 2011

EGit for Eclipse - Yummy

I love git.

There are two things that I find an absolute must for a novice coder like myself. The first is StackOverflow. I hear the screams, chuckles, and jeers now. It's true, however. The suffering that has been eased from StackOverflow, simply cannot be overstated. I'm also confident that I'm not alone. I cannot even guess at the number of times I have found myself scouring SO for an answer. While I don't always find everything I need, I often do. The second is version control and repositories. I use git and GitHub for a remote repository. They have, not only, changed my hobby-flow but my perceptions of coding. It was quite encouraging, actually.

Coming from Ruby on Rails and working in Terminal, I found a comfortable flow in branching often. I found that, more times than not, when I broke my app I'd simply move back to Master and start over. For a mediocre hack, who spends more time fixing than writing code, it's a dream. As I fumble around in Eclipse, however, I often thought back to my dreamy hobby-flow and wished for that flexibility and ultimately forgiveness. Well, there's EGit, of course. And, yes, I'm going to talk about getting it up and running in Eclipse.

Now, there are a number of tutorials/walk-throughs that offer the same thing. As such, I'll keep it short. It's likely those other examples are authored by individuals more qualified to discuss such things. As I said before, however, I'm going to talk about whatever I like without much concern for place.

It's quite simple.

(On a Mac with Eclipse 3.7.0 Indigo)

1. With the Eclipse Install New Software window simply paste this url in the Work with: field.
(Help > Install New Software...)

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

Press Enter

2. Select the updates (I did the Select All option)
The installer will run through a check on dependencies.

Press Finish

3. After Eclipse restarts control-click a project from your Package Explorer. Go to the Team option and select Share Project. In the Share Project window select git and Next. You'll see the Configure Git Repository window. Select Create... then Finish.

4. If you're new to git you'll need to do some configuration on your .gitconfig file. Here's a link. Or you can go to your Eclipse preferences and change the configuration file directly.
(Eclipse > Preferences > Team > Git > Configuration)

5. After your project is configured with a repository you can control-click > Team to see your git options.

That is heaven, my friends.

Easy to please...

Thank you,

Aaron

No comments:

Post a Comment