Pair is a PowerShell module. It allows you to quickly change the git user name and email to contain the names of people pairing. Those name and email will be attached to all commits made before the pair is changed.
Compatible with PowerShell 2+.
Given | John Doe and Jack Common are pairing today |
And | they're logged in with user name "HAL1" |
And | their aliases are "jd" and "jc" |
And | their base email is "[email protected]" |
When | they type "pair jd jc" |
Then | the git name is set to "John Doe and Jack Common on HAL1" |
And | the git email is set to "[email protected]" |
And | all of their further commits will contain those name and email |
- Install it [as any other PowerShell module] (http://msdn.microsoft.com/en-us/library/dd878350(v=vs.85).aspx). On PowerShell 3+ that usually means clone it to
$HOME\Documents\WindowsPowerShell\Modules
. If any folders in that path don't exist, create them. On PowerShell 2 you'll have to Import-Module the folder every time :/ You can do that from your profile script. - Create a coma separated file to match aliases to full names. An example [is included in the repo itself] (https://github.com/aulme/Pair/blob/master/defaultPairFile.csv). I suggest you sync that between machines.
- Run
Set-PairFile C:\my\pair\file\path.csv
, with the path of your new file - Run
Set-BaseEmail [email protected]
, pair emails will be constructed from that.
pair
will show you the current pair with full names.pair john jack
will set John and Jack as the current pair as long they're in the pair fileGet-PairAliases
will get you just the aliases of the people currently pairing. I include this in my prompt.