Coder Social home page Coder Social logo

xp-mode's Introduction

Status

xp-mode makes it easier to record what pairs worked on what commits.

Installation

On a POSIXish system:

curl https://raw.githubusercontent.com/ben-biddington/xp-mode/master/install.sh | bash && source ~/xp-mode.sh 

Read what installer does

Automatic update

Run pair update

ben@bang:~/sauce/xp-mode$ pair update 
Running the following in 5s: curl https://raw.githubusercontent.com/ben-biddington/xp-mode/master/install.sh | bash && source ~/xp-mode.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1481  100  1481    0     0    778      0  0:00:01  0:00:01 --:--:--   777
Installing xp-mode to </home/ben>
Deleting file at </home/ben/xp-mode.sh>
Downloading <https://raw.githubusercontent.com/ben-biddington/xp-mode/master/xp-mode.sh> to </home/ben/xp-mode.sh>
Pairs file already exists at </home/ben/.xp-mode/pairs>
People file already exists at </home/ben/.xp-mode/people>

Configuration

After installation you have a ~/.xp-mode/people file.

Add authors to it in this format:

Include yourself to make it so you can just use the names of all the people in the group.

Full names

You may also use full names by adding a second field.

Ben;                    [email protected]
Lisa; Lisa Shickadance; [email protected]
Denny;                  [email protected]

Options

Configure a commit-msg hook:

$ pair hooks

This adds Co-authored-by trailers to your commit messages. If you already have a commit-msg hook configured, it is left alone.

Turn hooks off with:

$ pair hooks -d

Usage

I am Ben and I am about to work with Lisa and Denny.

$ pair Ben,Lisa,Denny
commit 402c410f89947c88e3d4e42aefe199cf06917056
Author: Ben, Lisa and Denny <[email protected]>
Commit: Ben Biddington <[email protected]>

    Push to master

or with full names:

commit 402c410f89947c88e3d4e42aefe199cf06917056
Author: Ben, Lisa Shickadance and Denny <[email protected]>
Commit: Ben Biddington <[email protected]>

    Push to master

When you have hooks enabled, you get extra Co-authored-by trailers in your commits:

commit 7de767f5e59e154c705bee8de7413529dc287ab5
Author: Ben, Lisa and Denny <[email protected]>
Commit: Ben Biddington <[email protected]>

    And use small batches
    
    Co-authored-by: Mob <[email protected]>
    Co-authored-by: Mob <[email protected]>
    Co-authored-by: Mob <[email protected]>

To revert to normal operation:

pair solo

FAQ

  • Setting persists only within the current terminal session

Notes

  • Bash function is the only practical way to set GIT_AUTHOR_{NAME,EMAIL}
  • Also tried git_scripts, but subshells are not suitable
  • The only git config options seem to be user.name and user.email which are used to set both author and committer. Temporarily setting them is not an option.
  • Git hooks are no good either because they run in a child shell and cannot therefore affect the GIT_AUTHOR_{NAME,EMAIL} environment variables

xp-mode's People

Contributors

ben-biddington avatar denny73 avatar mexisme avatar richardofortune avatar themasterdrawer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kjgorman

xp-mode's Issues

You must supply name in co-author

Looks like you have to supply a value for name, so instead of:

echo "Co-authored-by: <$email>" >> $commitMsg

Do this

echo "Co-authored-by: Mob <$email>" >> $commitMsg

Authors are ignored otherwise

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.