I have tested it locally and it works but I'm not thrilled with it. Really the only way I think to reliably get around this is to use the git configuration command itself.