Usually, git aliases are confined to a single command:
git config --global alias.ci commit
So, instead of git commit
you could do git ci
But it seems you can insert a function in there as well:
git config --global alias.up-sub '!f() { cd $1 && git checkout master && git pull && git submodule update --init --recursive; }; f'
This allows you to call git up-sub some-submodule
The question is: how does it work? I haven't seen the !f()
syntax in any other context.