Interested in git?

I—like so many others in the Rails-o-sphere—am getting interested in git (a new-fangled source control system).

I’m a late adopter in this case, at least by some people’s standards. Because “some people,” in the Rails community, means the guys who went and created the git repository service github. So on the one hand, Chris, Tom and PJ built a service, and on the other, I’m just starting to read the man pages… I’m pretty behind.

Since it’s totally unlike what I’m used to, I suspect I’ll be writing about it here a bit in the future. I don’t know enough to say anything now except this:

If svn is your sometimes catankerous but serviceable steed, git is like a chimera crossed with a unicorn with handy built-in saddle bags plus a sword.

In this case, sword stands for “really awesome offline and collaborative performance, YOU KNOW I’M POINTING AT YOU SVN.”


So, there has to be value in this post somewhere. Ahhh, here we are!

Here’s what I’m reading to get up to speed:

Hope you find it useful!

And I would be appreciative of any super ninja git tips or tricks you might know (especially for those coming from years of torture and indoctrination by svn).

No Comments

  1. Bill says:

    You have the "proudly supported by Peepcode" there on your sidebar, so I’m sure you’re aware of the Git screencast there. It helped me immensely. Seeing it in action, as opposed to just reading how it works, really helped. There’s also something similar at Railscasts:

  2. David Madden says:

    Looking forward to hearing about any tips you uncover in you tinkering.

  3. David Parker says:

    I second what Bill said above. The PeepCode screencast was great.

    Thanks for the extra resources Amy. I’m just gitting into Git myself (lame pun, yeah).

  4. Avdi says:

    I recommend taking a look at some of the other DVCSs before you settle on Git – especially Darcs, Bazaar, and Mercurial.

  5. Amy says:

    @Bill and @David P, of course I’m aware of the peepcode. :) I haven’t seen it yet but I’m sure that it, like everything else Geoff produces, is awesome. I just didn’t think to link to it!

    I intend to watch it soon but right now I’m more in a reading mood! Sometimes I’d rather skim content.

  6. Erik Kastner says:

    AWESOME post. Here’s why:

    1) it feels "fast"… not too thought out, not polished over and over

    2) it feels like it’s going to spawn many more (which is sweet, your voice is SORELY missed), maybe even culiminating in a cheat sheet?

    3) It was a normal "here’s what I’m doing, blah" post until you went off the deep end of awesome with the sword stuff

    Now to not just asskiss, but try to provide blog-value: Two things made me love git… 1 – using it in a real project. Using it for colorwars might not have been the right choice (some people had trouble jumping in), but it taught me how to use it "in the wild" 2 – I’m getting the hang of it the same way I did with rails… that is, with rails, I made lots of little throw away projects.. 5-10 a day sometimes. Some just to try out a single feature of ActiveRecord (I remember one day I made a bunch just trying to understand has_many / belongs_to). With git, making a new repository is: mkdir test; cd test; git init . that’s IT.. with svn… (at least for how I mentally approached it) it was log into a server, run a script I created, restart a webserver, THEN check it out on my local machine, make 3 top level directories (etc etc etc).

  7. Assume, as a rule, that there is no shared lexicon between svn and git. To "checkout" in svn does not mean the same thing as to "checkout" in git. Some of these same-name, different-thing gotchas are obvious (commits and branches clearly work differently, for example) but some are more insidious. It’ll just take time to grok how things are different in distributed VCS.

  8. Bill says:

    Another good tip that I can’t remember the initial origin, is setting up aliases to make the keyboard work a little quicker. For example:

    git config –global status git config –global commit git config –global checkout git config –global branch

    So, then you can make the commands shorter, such as ‘git co branchname’ or ‘git ci -a -m "My commit message"’

    Just a few keystrokes, but they add up. :)

  9. Bill says:

    Ooops. Those commands should be on separate lines, but you get the idea.

  10. Amy – Also if you’re working in terminal a lot you can install the following gem: ‘sudo gem install cheat’ –then run the following command to view the GIT cheat sheet: ‘cheat git’

  11. johno says:

    What an unfortunate acronym, GIT. Well, for the British anyway:

    "Love and Hate" is brilliant, btw.

Leave a Reply

Hey, why not get a shiny
Freckle Time Tracking