Pair commits with ticket ids and co-authors made simple.
I hate seacrhing for the ticket id I'm working on at commit time, so I can include it in the commit message.
Now I don't need to worry about that, I can set the values with pair and have
them automatically added to my commits each time.
Find the latest version for your system on the GitHub releases page.
If you have go installed, you can clone this repo and run:
make installThis will build the binary and then copy it to /usr/local/bin/pair so it will be
available on your path. Nothing more to it.
Run pair --help for a full, up to date list of available commands.
Set the ticket id you are working on.
Tip
Set ticketPrefix in your config file if your tickets always have the same prefix,
and you can just type the part after the prefix.
You can pass the ticket directly to the command, or just run pair on for an interactive
prompt to enter the ticket id.
Select co-authors from the list defined in your config file.
Commit your staged changes using the values you have already set. If you have not set a ticket id or selected co-authors you will be prompted to set them before running the commit.
Tip
Want to sign your commits?
Set -s in the commitArgs field in your config file.
When you're all done with the ticket or work you were doing, you can run pair done
to clear the session data temp files.
By default pair checks for a config file called pair.json in your $XDG_CONFIG_DIR,
or $HOME/.config in a directory e.g: $HOME/.config/pair.json.
You can see an example of the config file format in the pair.json in the schema directory.
Tip
Make sure you add the $schema keyword to the top of your config file to
for in editor validation and descriptions of what fields are used for.




