Git Pair

by Andre Helberg (@A-Helberg)

Build Status

Description:

Git Pair allows developers to be jointly credited when Pair Programming and using Git.

Features:

  • Persists pair between different terminal instances.
  • Can be used in OSX GUI applications ( after restarting the application )
  • Allows you to expire the pair information in N hours. e.g. git pair --expire 8 fry leela

Installation & Usage:

Install the gem and add the setup to the end of your zshrc or bashrc file

$ gem install git-pair 
$ pair --setup >> ~/.zshrc

Restart your terminal.

To pair with someone replace the following names with your github names

$ pair A-Helberg aleciafb

Now just commit as you usually would. If you use a gui application on OSX, remember to restart it when you setupa new pair or switch pairs for it to take effect. The first person will be used as the author and the second person as the committer.

To switch the pairs around run:

$ pair --switch

Don't forget to unpair when you are done:

$ pair -u

For some help and a complete list of features:

$ pair -h

Install:

gem install git-pair
pair --setup 
  • this prints out the necessary shell function and aliases you need to add to your ~/.bashrc or ~/.zshrc
    • eg. pair --setup >> ~/.zshrc
  • Or copy/paste the code into your ~/.bashrc or ~/.zshrc
  • As another option, copy/symlink the script to a separate file (e.g. ~/.bash/git-pair.sh or /etc/profile.d/git-pair.sh) and source it. You can get the path using pair --setup-path.
  • Restart your terminal.

Development:

  • Fork git-pair
  • Add tests and code for your feature
  • Create a pull request
  • Double-check TravisCI to make sure all tests pass

Requirements:

  • Git, HighLine

Acknowledgements:

License:

Released under the MIT License. See the LICENSE file for further details.