Giter VIP home page Giter VIP logo

git-pair's Introduction

git-pair

Retina-ready Shields example

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

Usage

Install the gem:

gem install edsinclair-git-pair

Usage:

$ git pair

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

Options:
    -a, --add AUTHOR                 Add an author. Format: "Author Name <[email protected]>"
    -r, --remove NAME                Remove an author. Use the full name.
    -d, --reset                      Reset current author to default (global) config
    -s, --show 'aa [bb]'             Show the string to be used for the commit author field
        --install-hook               Install a post-commit hook for the current repo. See git-pair/hooks/post-commit for more information.
        --email EMAIL                Add a default email address to be used for pairs

Switching authors:
  git pair aa [bb]                   Where AA and BB are any abbreviation of an
                                     author's name. You can specify one or more authors.

Current config:
     Author list: Adam McCrea <[email protected]>
                  Jon Distad <[email protected]>

     Pair email: [email protected]

  Current author: Jon Distad + Adam McCrea
   Current email: [email protected]

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 will be generated using the first author's email domain part and the address local parts separated by a '+' will precede the '@'.

You can specify a 'pair' email address to be used in which case the local part will be followed by each author's initials separated by a '+' will be used to form the local part of the pair email address. Alternatively if you leave off the local part and specify the pair email address as '@domain.tld' the local part for the pair email will be composed of the local part for each author's email address.

Examples with the git pair email set:

If the git pair email is: [email protected] Then pair email address will be [email protected] If the git pair email is: @example.com Then pair email address will be [email protected]

Examples without the git pair email set:

First author is Adam McCrea. Then pair email address will be [email protected] First author is Jon Disatd. Then pair email address will be jdistad@[email protected]

About this version

This was forked from http://github.com/edgecase/git-pair which in turn was forked from http://github.com/chrisk/git-pair. Many thanks to Chris Kampmeier for the original version and Adam McCrea, John Distad and Ehren Murdick for the features they added to the edgecase release. This version adds a --show, --email and --install-hook options and converts the gem to use Bundler for dependency management.

License

Copyright (c) 2009 Chris Kampmeier. Copyright (c) 2013 Eirik Dentz Sinclair. See LICENSE for details.

git-pair's People

Contributors

adamlogic avatar chrisk avatar edsinclair avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.