I have started using git for most of my projects. It started as a way for me to continue working with my SVN repositories when I was offline, but as I got more familiar with the application I found I was choosing it over svn.

Why choose it over svn? Because I truly believe that if you are not versioning your code, you shouldn’t be writing code. Why don’t people use versioning systems? Because they are hard to work with and they get in they way. Having to go setup repositories and such can be a major pain. Git is simple. After installing git, CD to the directory of your project and type `git init`. Thats it. You are now ready to start writing code and making commits. Want to share your code with someone? Just zip up the directory and send it to them. Your single .git folder that is at the root of your project contains all the information they need to checkout the history of your work. Don’t want to share your history? Don’t send the .git directory with it :)

Git is a distributed version control system. What does that mean? There does not have to be a single central repository. Any single users copy can be cloned and published and shared on a network sever and accessed via many protocols.

What prompted me to write this post was actually this article on useful git utilities. My primary interaction with git is via the command line and sometimes I dont remember all the options that are available. Using this bash script will allow you to get auto completion for all the git commands. Nice! The trick is to just save that bash file to your home directory and then source it into your path. On the mac, you can edit your .profile file to add the line `source ~/git-completion.bash` (don’t put in the `’s though).

Go on now, get your Git on!