you can use
-c <name>=<value> to add a configuration only for one command.
To commit as an other user without having to change your settings in .gitconfig :
git -c user.email = mail@example commit -m "some message"
Note: for that example you don't need to precise both
user.email, git will complete the missing information from the previous commits.