Brandon's Blog

4/11/2008

Git

The page design and copy text would likely bring a smile to Linus’ face, as it does to mine.  Git is pretty fun (and somewhat confusing for a newb) to use; it’s currently managing the source for the CMS, where it is very under-stressed as a branchless, one-user installation.

I did branch once as an experiment.  Branching in git is akin to making a “lazy copy” of your program, which gives me another term to define.  What I’m aiming at here is that when you copy something, it originally takes up virtually no space.  The space requirement of the copy only expands when changes are made to one copy and not to the other.

So, with git, you pretty much say “make me a branch/copy of what I have right now and switch to it.”  If, later, you issue a “switch back to the original branch,” your original code will show up, which you can also change.  Then, when you have changes on both branches, git will help you merge them together and resolve conflicts.

It’s pretty nice, but the user-facing side is pretty complicated.  I’m getting used to it, though.