Skip to content

tx3stn/pair

Repository files navigation

pair

Pair commits with ticket ids and co-authors made simple.

pair-demo

Contents

Why?

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.

Install

Download from GitHub

Find the latest version for your system on the GitHub releases page.

Build it locally

If you have go installed, you can clone this repo and run:

make install

This 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.

Commands

Run pair --help for a full, up to date list of available commands.

on

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.

pair-on-demo

with

Select co-authors from the list defined in your config file.

pair-with-demo

commit

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.

pair-commit-demo)

done

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.

pair-done-demo

Configuration

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.

Schema

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.

About

pair commiting made easier

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors