New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gitpair

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitpair

Allow you to commit with more than one person, e.g. Pair programming or Mob programming.

  • 0.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17
decreased by-70.69%
Maintainers
2
Weekly downloads
 
Created
Source

Gitpair

When pairing or doing mob programming on github projects, git does not allow us to commit with all the names of people who contributed. Gitpair allows you to setup your team members and commit as normal. It then changes your commit based on the list of people referenced in the commit message.

Each author will randomly be credited with commiter or authorship, so that we can each be credited in our github contributions view !

Before Gitpair :sob:

before

After Gitpair :heart_eyes:

after

Gitpair does not require you to change the way you commit. Simplify use the git commit command or your favorite tool!

Example:

The following two commits

$ commit -am "JBH|BDO|JON Added README file"
$ commit -am "@jordan @benoit @jonathan Added README file"

are equivalent and will result in the following commit:

commit 5aac6c15b7ea2b8ed6b8daaba01539931b9d9309
Author:     Jordan Bartholomew-Harrison, Benoit d'Oncieu and Jon McClennon <bdoncieu@gmail.com>
AuthorDate: Thu Oct 27 22:09:34 2016 +0200
Commit:     Jon McClennon <Jon.McClennon@gmail.com>
CommitDate: Thu Oct 27 22:09:34 2016 +0200

    BDO|JM: Added README file

The author's name contains the list of all author names while the author and committer emails will be randomly choosen amongst the list of committers. The commit message is normalised as a pipe separated list of initials followed by a dash.

Installation

Pre-requisites

A recent version of node and npm.

Install

$ npm install gitpair

The installation adds a post-commit hook at the root of your project in the .git/hooks directory.

Note: Do not install globally with npm install -g as it won't work :wink:

Configure

Create a .gitpair file in your user home folder. For instance:

{
  "team": [
    { "name": "Benoit d'Oncieu",             
      "aliases": ["bdo", "benoit"],
      "email": "bdoncieu@gmail.com" },
    { "name": "Jon McClennon",
      "aliases": ["jm", "jon", "jonathan", "jonathanmcclennon"],   
      "email": "Jon.McClennon@gmail.com" },
    { "name": "Jordan Bartholomew-Harrison", 
      "aliases": ["jbh", "jordan", "jordanbharrison"], 
      "email": "jordan.bh@outlook.com" }
  ]
}

Commit message patterns

You can use one of two styles of commit messages. The user names used must correspond to one of the aliases you listed in your .gitpair file (see above).

Github styledInitials
@bdo @jon Added package.jsonBDO|JON: Added package.json

Notes:

  • The normalised format message will use the Initials pattern and the first alias for each author.
  • When using the Initials flavor, the semicolon is optional.

Uninstall

$ npm uninstall gitpair

This removes the post-commit hook which was added during the install.

Keywords

FAQs

Package last updated on 31 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc