A command-line tool to ease the management of multiple GitHub accounts from the same workstation.
- Effortless Account Switching: Quickly switch between different GitHub accounts within your local Git configuration.
- Simple Configuration: Intuitive configuration management for your accounts.
- Cross-Platform Support: Works seamlessly on macOS, Linux, and Windows.
Download Pre-built Binaries
- Visit the latest release page: https://github.com/ZiadMansourM/tut/releases
- Download the appropriate
.tgz
archive for your operating system and architecture (e.g.,tut_linux_amd64.tgz
). - Extract the archive:
tar -xzvf tut_linux_amd64.tgz
- Move the
tut
binary into a directory in your PATH (e.g.,/usr/local/bin
). - Add inside
$HOME/.tut/.ini
file, your account credentials just as the following:
[account.a]
name = ZiadMansourM
email = personal@gmail.com
sshCommand = ssh -i ~/.ssh/ziadmansourm
[account.b]
name = ziadmmh
email = ziadh@work.com
Important
Make sure to prefex each section with account.
- Edit your
$HOME/.gitconfig
to include this:
[include]
path = ~/.tut/.gitconfig
If you use one workstation to contribute to projects for more than one account on GitHub.com, you can modify your Git configuration to simplify the contribution process. There are many ways you can achieve that. Read here for more details.
Warning
Please, be aware that tut
supports only using two differnet protocols
for each account. E.g. use ssh for your personal account and https for work account.
The protocol you use to clone a repository determines which credentials your workstation will use to authenticate when you access the repository. That is exacly why we choose this approach.
- Configure your personal account with ssh access.
- Configure your work account with https access.
- Create the
$HOME/.tut/.ini
file as described above. - Edit
$HOME/.gitconfig
as described above. - Clone a private repo from both of your accounts, you should have no problem on doing that.
- Before you make any changes run
tut
and choose correct account. Other than that the wrong github username and email will appear in the commit messages.
I welcome your contributions! Here's how you can help:
Open Issues
: Share your ideas, feature suggestions, or any bugs you discover.Submit Pull Requests
: Feel free to directly propose code improvements or new features.
This project is licensed under the MIT License – see the LICENSE file for details.