Switching git users in Emacs based on repository

Using Github internally for work is really nice, but especially when working on multiple projects, some on public and some on internal Github it can also be quite hard to always remember to use the correct username and email for the commits. Because I tend to forget such things I decided to create a little elisp function to make sure the correct user is set when I start magit. Right now I only have to switch between 2 users so it is managable, but I think this is easily extended to more if the need arises (god I hope not).

https://gist.github.com/sideshowcoder/ae1f6b9ab4e5944472c1.js

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.