$ git config alias.q '!echo a; echo b' $ git q
I think this is (rudimentarily) documented in
man git-config under
Note that git commands should include git, unlike in normal aliases. It is caused by fact that it is treated as a shell command, not as a git command (see manpage quoted in the question). For example to chain
git commit --allow-empty -m "empty initial commit"
it is necessary to create
"!git init; git commit --allow-empty -m \"empty initial commit\""