User of multiple git accounts, in order to meet my need to switch regularly between these accounts (student, professional, personal), I developed an open source cli (a command line interface) in Golang.
This program helps switch between different git user accounts easily.
It automates the following commands:
git config --global user.name "yourUsername"
git config --global user.email "yourEmail"
There is currently 3 modes in this script:
- 💻 work : for a work related git account.
- 📚 school : for a school related git account.
- 🏠 personal : for a personal related git account.
brew tap lucasnevespereira/tools
brew install gituser
or
brew install lucasnevespereira/tools/gituser
Make sur your bin path is in your $PATH
, you can check in your .zshrc
or .bash
file.
e.g
export PATH="$HOME/bin:$PATH"
Run the following command from the root of the project:
make install
This will build gituser and move it to your $HOME/bin
Now you can call gituser
globally 😀
Run the following command :
gituser setup
This command will help you setup your different git accounts.
Call executable with mode
gituser <mode>
Examples:
gituser work
gituser school
gituser personal
The flag help
is a default flag that prints existing flags.
The flag manual
will print some information about the program.
The flag info
that will print some information about the accounts.
The flag now
that will print what git account is currently active.
gituser <flag>
If you want to contribute to this project please read the Contribution Guide.
This project is under MIT LICENSE