1. Git aliases.
You can add configuration to git so that git subcommands invoke arbitrary commands:
This is what legit does, here:
2. Any executable in your path named 'git-foo' can be invoked by 'git foo'.
Neat, huh? It's a useful way to create your own workflow scripts without having to touch your git install.