Skip to content

Instantly share code, notes, and snippets.

@scottoffen
Last active March 7, 2016 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottoffen/c79bc2db1add46987c95 to your computer and use it in GitHub Desktop.
Save scottoffen/c79bc2db1add46987c95 to your computer and use it in GitHub Desktop.
Git Personal
[alias]
personal = config user.email "personal@emailaddress.com"

Git Personal

Using git both on the job and on personal projects on the same computer?

My company encourages us to take time every Friday afternoon to work on open source projects and contribute back to the community. It's one of the things I like about the company I work for. We use git internally, and I use GitHub for my personal projects. I don't want my personal git commits to have my company email address on them (from my global git config), so I often find myself changing - or, more frequently, forgetting to change - my email address on a per-project basis from the company address to my personal one.

Recently, I decided to just add an alias in my git config for this commonly forgotten task. This way, the default email address on my projects - set at the global level - is still my work address, but I can change it at any time for a given project with the simple command:

$ git personal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment