Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Configure git to commit as more than one author.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 config
Octocat-spinner-32 features
Octocat-spinner-32 lib
Octocat-spinner-32 .autotest
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 Rakefilex
Octocat-spinner-32 mynewsdesk-git-pair.gemspec


A git porcelain for changing and so you can commit as more than one author.


Install the gem:

gem install mynewsdesk-git-pair

And here's how to use it!

$ git pair

General Syntax:
  git pair [reset | authors | options]

    -a, --add AUTHOR                 Add an author. Format: "Author Name <>"
    -r, --remove NAME                Remove an author. Use the full name.
    -d, --reset                      Reset current author to default (global) config
        --pattern PATTERN            Set email pattern. Example: "dev+%name+%name@%domain"
                                       %name   - First name
                                       %last   - Last name
                                       %abbr   - Abbreviation
                                       %domain - Use domain from global config
        --remove-pattern             Reset the current email pattern to default.

Switching authors:
  git pair aa [bb]                   Where AA and BB are any initials or first/last name
                                     of an author. You can specify one or more authors.

Current config:
     Author list: Adam McCrea
                  Jon Distad

  Current author: Jon Distad + Adam McCrea
   Current email:

How does it work?

The list of authors is maintained in the global git configuration file. The current author is set in the git configuration local to the project. The email address for a pair is generated using the default email address from the global configuration along with the developer abbreviations.

About this version

This was forked from, which its turn was forked from Many thanks to Chris Kampmeier for the original version. Jon Distad and Ehren Murdick's version added the --reset option and did a great job refactoring the code.

We updated the gem to depend on Bundler rather than Jeweler and added the option to configure how the pair's email address is generated since the hardcoded one didn't adopt to the one we got by using Hitch.


Copyright (c) 2009 Chris Kampmeier. See LICENSE for details.

Something went wrong with that request. Please try again.