Adjusting your git email address per clone

I’ve been working a lot with git over the years. To that end, I commonly use my personal email address for projects I post on my github. Additionally, I have a project or two in which I participate. The email address I use there is just an alias to my personal email, but I want to use it instead of the email above.

Today, I came across an article that makes changing this value much, much simpler.  Try this:

$ git config --global alias.personal 'config "herlo@personal"'
$ git personal
$ git config
$ git config --global 'config "herlo@work"'
$ git work
$ git config

As you can see, it’s now trivial to switch between certain email addresses. Man, git aliases are very nice!