Crates.io | partners |
lib.rs | partners |
version | 0.2.1 |
source | src |
created_at | 2015-10-22 08:36:07.092658 |
updated_at | 2017-04-13 09:23:47.886646 |
description | Switch between multiple git authors |
homepage | https://github.com/elabs/partners |
repository | |
max_upload_size | |
id | 3284 |
size | 21,476 |
Partners is a convenient command line tool for switching between different git users, and combining them when multiple people are working together. It is a similar alternative to gitswitch.
Because switching between different user settings on shared workstations, especially when pair programming can happen quite frequently, and the existing tools don't address the problem very nicely.
We've used gitswitch for a long time, but it has a lot of problems:
All other alternatives we could find seem to be incomplete or unmaintained.
First, install Rust and Cargo. You can use rustup, or on OS X you can simply install them via Homebrew like this:
$ brew install rust
Now install Partners via Cargo:
$ cargo install partners
It might prompt you to add Cargo's install directory to your path.
Now run partners' interactive setup:
$ partners setup
This will prompt you to create the configuration file if it doesn't exist.
Partners maintains a list of authors it knows about, you can inspect this list by running:
$ partners list
You can add a new author by running:
$ partners add
This will prompt you for their nickname, name and email address. You can use the nickname to quickly change your git author information like this:
$ partners set jonas
jonas:
Name: Jonas Nicklas
Email: jonas.nicklas@gmail.com
Where jonas
is the nickname. You can also use multiple nicknames:
$ partners set jonas kim
jonas+kim:
Name: Jonas Nicklas, Kim Burgestrand
Email: dev+jonas+kim@elabs.se
In the case of multiple authors, partners constructs the email address based on the authors' nicknames, and the domain, prefix and separator configuration parameters specified during setup. You can change these any time by running:
partners setup