Today I learnt Git...

I've been working with SVN for a couple of years. I'm familiar with it now, it no longer seems like a militant policing system that enforces rules on my way of working, and instead feels like a reliable old friend who looks out for me when I inevitably cock something up. SVN is pretty cool.

Getting comfortable makes me antsy. Being familiar with one tool, and one tool only for a particular job, is in my mind, a very bad habit. It's a bad habit because that's what these things become - I use them out of habit, not because they are good, or the right tool for the job, but because it's what I know, and like and am comfortable with. My comfort zone makes me uncomfortable.

I've been toying with Git for a while now. I've had it installed on my computer, I've read about it, I've got an account on <a href="http://github.com" title="GitHub - Social Coding target="_blank"">GitHub and I've even forked a few things (tee hee). But today I've gotten serious. I've decided to manage my next few personal projects with Git instead of SVN, and try to add it as another tool in my personal web armoury.

Getting Git

"My comfort zone makes me uncomfortable."

First things first, I've just installed it on my Ubuntu Virtual Machine. Linux is something I've been working with for a long time, but never really gotten comfortable with or particularly used to... another reason to invest some time setting up Git, as very soon I will be working pretty exclusively with Linux (but that's another story).

With Git installed, I could use a local repository for my projects, but that seems kinda pointless - sure if I stuff up a change, I can go back to an earlier version, but if I corrupt my VM then what? I could also use my account on GitHub, but as it's just some testing/playgrounds, it seems odd to make it public. Instead I've decided to use my lovely Unfuddle account. Unfuddle lets me create fully backed up SVN and/or Git repositories on a free account, it's pretty damn awesome!

Setting up a public key. Another one of those tasks that seems like it would be infinitely complicated, yet when you follow along with the documentation it suddenly becomes easy. Git mastery here I come.

My exploration into Git, GitHub and the underbelly of linux is all in aid of my desire to play around with the latest and greatest version of Symphony CMS - one of my favourite things the internet has to offer. So far I've managed to clone Symphony's Git Repository from GitHub, setup my own Git repository on Unfuddle, and get my local project setup so that I can pull Symphony updates from one repository, and keep my own project-specific modifications in my own repository - meaning all the talk I've heard of Git having nothing to equal svn:externals is complete rubbish! Great :)

Final Git task.. make some custom modifications and save them back to my own repository. So I've "git committed" and spent ages wondering why my changes aren't appearing in my private repository.. surely I can't have committed to the Symphony repository - it's read only? Only to discover that the whole point of Git of course, is that my commits are local, I have to "git push" them to the repository. Magic.

Well that's the end of the beginning of my journey with Git. I feel like I've gotten the basics of how to do stuff, although the "why" and the underlying principles are still somewhat groggy. I'm sure it'll make sense over time, and when I feel familiar I'll post about the differences between SVN and Git and what each one is good/bad for.

G'Night.

Resources

A couple of things I've used to learn Git: