Erik Aybar

Quick Tip/Snippet: Change Git user/email per repo

September 07, 2014

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'
# Within repo
$ git_user_personal

Set work Git user information

alias git_user_work='git config'
# Within repo
$ git_user_work

That is all :)

Erik Aybar

👋🏽 Hi! I'm Erik Aybar. I'm a software person working remotely from St. George, Utah. This is my blog.