Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-pair

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-pair

Git pair programming tools

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Git pair

Git pair programming tools

Allows you to commit with two users by making one the committer and the other the author. Also lets you switch users easily.

Credit to @roylines for the original idea in his gits repo.

Install

npm install git-pair -g

This installs:

  • A git alias git users
  • An executable gitp

Local install

You can also install git-pair locally:

npm install git-pair

This will install the git alias to the local git config, to use gitp you need to run:

./node_modules/.bin/gitp

Quickstart

Configure the users for your pair with git users, then use gitp instead of git:

git users jane@example.com bob@example.com
gitp commit -m "Did the code"

Components

git users

This alias allows you to get or set git users. You can find out which users are currently configured using:

git users

You can set users using their email addresses:

git users jane@example.com bob@example.com

This looks up git usernames from GitHub, alternatively you can specify usernames explicitly:

git users jane:jane@example.com bob:bob@example.com

The users are stored as values in git config. The first user entered is always the normal git user.

gitp

gitp is a wrapper executable for git which injects git committer and author environment variables to the command to allow two people to contribute to a commit. It alternates the committer and author in each commit.

Simply use it as you would use git e.g. gitp commit -m "Fixed the thing"

Aliasing

You can also alias this over git to use this in place of it. I prefer this because it prevents people from accidentally committing with a single user. Simply add alias git='gitp' to ~/.bashrc (or ~/.bash_profile on Mac).

Keywords

FAQs

Package last updated on 20 Mar 2015

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