Skip to content

A tool to make it easier for git based pairing for co-authoring commits

License

Notifications You must be signed in to change notification settings

inverse/git-pair

Repository files navigation

git-pair

CI GitHub

A tool to make it easier for git based pairing for co-authoring commits.

Demo

It leverages the template feature of git by allowing you to easily managed repo scoped templates of co-authors.

Installation

MacOS

brew install inverse/homebrew-tap/git-pair

Arch:

yay -S git-pair-bin

APT based distro:

Add the following to a new file called /etc/apt/sources.list.d/inverse-fury.list

deb [trusted=yes] https://apt.fury.io/inverse/ /

And then install:

apt-get update && apt-get install git-pair

For RPM based distro:

Add the following to a new file called /etc/yum.repos.d/inverse-fury.repo

[fury]
name=Inverse Private Repo
baseurl=https://yum.fury.io/inverse/
enabled=1
gpgcheck=0

And then install:

dnf install git-pair

Binaries are also distributed in the releases page. Simply download the archive for your architecture and unpack and add the binary to your path.

Usage

By default the tool will look up commit authors from the git history of the repo you are in. However, you can also maintain a list of authors within your home directory in a file called ~/.contributors.txt. This file uses the Name <email> format.

To get started run git-pair [s]tart, selecting the contributors for the pairing session.

You can find out the current state of contributors running git-pair [i]nfo.

One you are done with that pairing session just run git-pair [e]nd.

Note: Sessions are scoped to git repositories by leveraging commit templates.

Developing

Built using mise for managing required development dependencies.

Building

task build

And you'll find the binary for your architecture in the dist/ directory.

Format

task format

Lint

task lint