http://en.wikipedia.org/wiki/Git_(insult)
but my favorite is this:
Git is technically an insult but has a twinge of jealousy to it. You'd call someone a git if they'd won the Readers' Digest Prize Draw, outsmarted you in a battle of wits or been named in Bill Gates' Last Will and Testament because of a spelling mistake. Like sod, it has a friendly tone to it. I'm told it derives from Arabic, where it describes a pregnant camel, of all things.