museless aiming

git tricks

This page will hold any cool tricks I've found or come up with using git.

Colourizing git

I love colours. See cheat git.

git commits in vim

This page has a cool idea -- use vim syntax and ftplugin for git. However I had to modify a few things to get it to work the way I wanted. I'll post mine soon.

zsh/git status trick

If you're like me, and you're probably not, you're constantly typing 'git status'. Of course, if you don't use ghostscript much you can abbreviate this to gs or simpler. Here's a cooler trick if you use zsh:

function chpwd {
  if [ -d .git ]
  then
    git status
  fi
}

What does this actually do? Well, if you enter a directory that's tracked by git, it automatically shows you the git status. For me this is great, because it reminds me of what I've been doing in that directory, and potentially even shows me that I've forgotten to commit something.

Another alternative is to show the branch in your zsh prompt. I'm not really cool enough to use that many branches though, but maybe eventually I'll do that (probably in RPROMPT).

: git : : vcs : : tech : : zsh :
Fri Mar 7 01:37:57 GMT 2008