Ditching Subversion in favour of Git!

While I’ve never really had issues with Subversion, I’ve always used it in a very closed environment where the centralised work flow never was an issue. However with the release of TypeFace, and the general raving in the Rails and Linux Kernel communities regarding Git, it’s hard to ignore it.

Personal Advantages …

Having watched an excellent tongue ’n cheek presentation by Linus, I have to say I very quickly sold by it considering Linus is no marketing guy!

One of the interesting things about Git is that it completely changes your work flow and you suddenly find your self with a lot more freedom. Even if you are a solo coder, or still choose to flow the centralised model you were using under Subversion, you find that the ability to commit locally means that you commit more often because you don’t have to worry about making sure your code is ‘stable’ or ‘passes all the unit tests’ until you push it to the centralised system or someone else needs to pull from you. The increased commit rate makes a big allows everyone to have more up to date copies, which in turn avoids conflicts and saves merging. Certainly for OSS applications this a huge improvement as it encourages people to fork code and experiment now that merging is not such a chore.

Anyone using Subversion should seriously consider the switch. While there seem to be a number of nice distributed version control systems out there such as Darcs, and Bzr, it does seem like Git is showing it’s self to be one of the most superior. I prefer using .gitinore files to control ignored files rather than running svn propedit svn:ingore {folder} all over the place with new projects. The .gitignore file can easily be copied from project to project in the case of Rails projects.

Other Advantages

There are tonnes of other cool features I haven’t discovered or reported on here; such as the ability to track code throughout the project is great. For instance git can tell if you move a function from one file to another because it ‘sees content, not files’ in the words of Linus. Likewise easy email patch generation, and the lack of .svn files being littered in each folder are a couple of others that spring to mind. (This is so handy as I often use grep to search through code, and hated all the annoying contents of .svn being reported by default).

Windows Warning

If you use Windows, you probably need to use Cygwin for now until native binaries emerge. Also, the only thing I have found frustrating is that files that get end up getting the odd DOS style CRLF line ending in them later seem to make git moan about patching or something. I found the easy way round this was to use git config --global core.autocrlf=input (only needs to be one once on your computer) and turn off precommit hooks using git commit --no-verify when git complains. This global CRLF setting will ensure DOS line endings are only converted on input. Ideally if you use Windows, you should be using an editor like UltraEdit which allows you to edit in UNIX mode by default.

Listening to Psychedelic Trance / Electronic:
Pistolwhip - Joshua Ryan

Free Designs

Below are a handful of open source / free web designs