4 ms·
This can be done in two ways: 1. Git aliases. You can add configuration to git so that git subcommands invoke arbitrary commands: https://git.wiki.kernel.org
by aaronharnly 14y ago
This can be done in two ways:
1. Git aliases.
You can add configuration to git so that git subcommands invoke arbitrary commands:
https://git.wiki.kernel.org/index.php/Aliases https://git.wiki.kernel.org/index.php/Aliases
This is what legit does, here:
https://github.com/kennethreitz/legit/blob/develop/legit/cli.py#L407 https://github.com/kennethreitz/legit/blob/develop/legit/cli...
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.