Just use --local instead of --global. In fact, local is the default so you can just do
git config user.email personal@example.org
git config user.name "whatf hobbyist"
in one repo, and
git config user.email work@example.com
git config user.name "whatf at work"
in another repo
The values will then be stored in in the .git/config for that repo rather than your global configuration file.