Learning Git

March 05, 2009

I've been planning on getting more familiar with git for several months. Yesterday, I watched the Google talk in which Linus Torvalds covered many of the advantages of the tool.

I use git for most of my personal stuff because distributed version control is certainly the simplest to use when there is only one person working on the project. It's extremely simple to create a repository. All you need to do is have git installed, and run a few commands.

That's about the extent of what I knew how to do with git. I could check things out, commit things back, and do a little reverting if I needed to. That's all simple, and it's often all that I need. However, git really starts to become useful when you get a better understanding of how branching and merging works.

I find centralized revision control to be a more intuitive model, but that is probably just because it is what I am familiar with. Distributed systems have no central repository. Each individual who pulls from a repository makes a copy of it on their local machine. Any changes they make can be committed to their local repository. After they finish what they are working on, their repository must be pushed or pulled into another repository. Essentially, everyone gets their own repository, which must eventually be merged back.

I was considering explaining the basics of git here, but the community book does a fantastic job of that. This page does a pretty good job of explain how git actually works under the hood.

Check out my other pages tagged "blog".