I want to use a bash function in a git alias. So I added this to my .bashrc:
.bashrc
fn() { echo \"Hello, world!\" } export -f fn
I don't know why, but if I just put a space before the function name in .gitconfig, it works without a problem and outputs the message:
.gitconfig
[alias] fn = ! fn
It might be a bug in git, or I'm missing something in the documentation.