11 Jan 2012

GITT: Git In The Trenches

My journey using SCMs has taken me through SourceSafe (ouch!), Subversion, Mercurial and finally Git.

Despite all that experience, when I started using git I felt a bit lost. Beeing most of the time a sole developer, I really never used the most advanced features of those tools, only the basic stuff. Even with Mercurial, my branching model was based on cloning a full repository in another folder and pulling/pushing as needed.

Now I’m using git for most of my repositories and every day I learn something new. I really like git.

The best resource I’ve found to really grasp git is Git In The Trenches by Peter Savage. Thanks to this book I moved from a “branch/merge” level of understanding, to use “rebase” confident about what is going to happen.

I like the style of the book because is based on scenarios you’ll likely face sooner or later. For example:

  • Have you ever wanted to edit a commit message?
  • Wanted to merge two different commits into one?
  • Wanted to recreate a branch that was deleted by mistake?
  • Search where a change (a bug) was introduced, even automatically?
  • Discovered you have sensitive data (secrete keys) in your repository and want to remove it?

It’s all there. It’s a really good book. Even though I read it cover to cover, I’m sure I’ll get back to it as a reference.

Oh! I almost forgot, it’s free, even the PDF / e-book versions.