1.0.0 • Published 8 years ago

gitrc v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

gitrc

Create different git profiles and switch between them

Usage

First install gitrc:

$ npm install -g gitrc

Then create a ~/.gitrcs folder and add some profiles.

$ ls -1 ~/.gitrcs
personal
work

Profiles are actually just shell scripts that can have anything in them:

$ cat ~/.gitrcs/personal
git config --global user.name "Jessica Kelly"
git config --global user.email "thatjessicakelly@gmail.com"
$ cat ~/.gitrcs/work
git config --global user.name "Jessica Kelly"
git config --global user.email "jkelly@enterprise.biz"

You can list what gitrcs you have by running

$ gitrc
personal
work

Then you can activate one by running:

$ gitrc work
$ gitrc
personal
work (active)
$ git config --global --get user.email
jkelly@enterprise.biz