I have the email address problem, but that's the only paramter that needs to vary. I use the simplest way of handling this, which is this in my .config/git/config: [user] name = "My Name" useConfigOnly = true Then, the first time you commit in each repo, you'll get an "Author Identity Unknown" message. Then just run `git config --local user.email hello@example.com` to set the config for that repo.
[alias]
whoami = "!f() { echo $(git config --get user.name)' '; }; f"
but I might switch to your less error-prone approach.