Recently I've found myself needing to alternate between Git user identities between my personal and work projects.
Here is a quick snippet of how I do so...
Mostly for my own reference ;)
Set personal Git user information
alias git_user_personal='git config user.email firstname.lastname@example.org' # Within repo $ git_user_personal
Set work Git user information
alias git_user_work='git config user.email email@example.com' # Within repo $ git_user_work
That is all :)