Saturday, July 30, 2011

Git: In Theory and in Practice

I've just published a new course over at Udemy: Git In Theory and in Practice.

I've been using source control systems for 10 years or so, and Git for over three years now. It's amazing how some of the fundamental differences in how Git accomplishes the same goal as most other SCMs lead to a much better developer experience and open up unexpected, new, powerful ways of working. 

Take branching, for instance. Branching is a fairly straightforward idea, but the cognitive load placed on you by other SCM tools like Subversion, which make branching such a high ceremony process, make it almost certain that you won't use branches except in very important situations where branching is absolutely necessary. Git makes branching so easy because a branch is really nothing more than 40 characters written in a file that points to a commit. It's painless to make a new branch, merge a branch into another, and with a little more study you can learn how to re-parent a branch, change the commit order on a branch, and so on.

Git has at least two extra layers of "staging" - the Index, for staging commits, and the fact that it needs no remote server to commit changes to the repository. Consider commit order. Because Git is distributed, it makes it much easier to make your branches look the way you want before you share them with others. That power and safety allow you to work the way you want to work, and then take the time later to think about how to make the repository look the way you want.

I learned Git in large part thanks to Peepcode's screencast and Scott Chacon's awesome Git internals PDF, also from Peepcode. To a large extent, Git is a known technology. Lots of people use it. Why would I want to create a new screencast to teach people a fairly common technology? Well, I still think Git is not as prevalent as it could be, and I think even when it is, I've observed people that use it either only scratching the surface, or applying patterns learned from other SCMs. That's why I wanted to make a course that taught not only how Git works, but how it does what it does and to show examples of situations where developers can easily take advantage of some of the power Git affords them.




Posted via email from Tony Hillerson's Posterous

1 comment:

amberdixie17 said...

There is obviously a lot to know about this. Thank you! paint melbourne