3 ms·
So I installed and use `git open`. How do these applications get to work, prefaced by `git`? Wouldn't `git quick-stats` just invoke `git` with an invalid parame
by Waterluvian 8y ago
So I installed and use `git open`. How do these applications get to work, prefaced by `git`? Wouldn't `git quick-stats` just invoke `git` with an invalid parameter?
- erik_seaberg 8y ago$ cat >~/bin/git-foo echo foo! $ chmod +x ~/bin/git-foo $ git foo foo! $ git help foo No manual entry for git-foo
- smarinov 8y agoWhen you installed it, `make` changed your global .gitconfig file and added the respective Git aliases to it, so that Git would know what to do and not complain about invalid commands. This happens on this line of the project's Makefile: https://github.com/arzzen/git-quick-stats/blob/master/Makefile#L21 https://github.com/arzzen/git-quick-stats/blob/master/Makefi...
- Waterluvian 8y agoAha. So this is possible because git is designed for these kinds of aliases. I wasn't sure if maybe it was core to Linux or something. Thank you.
- zimpenfish 8y agoAside from aliases in your `.gitconfig`, as far as I know, if `git-subcommand` exists in your path, `git subcommand` will call that script for you automatically. ie if you put `git-monkey` in `$HOME/bin`, add `$HOME/bin` to your path, now `git monkey` is a valid subcommand.