For Git-friendly Pair-Programming sessions.
Sign your commits with your pair 2-part name and email : andy_john / firstname.lastname@example.org
When you're done, restore your local git config in a snap.
Quick Usage :
$ ppgit john andy $ ppgit clear $ ppgit info $ ppgit john andy email@example.com $ ppgit ara nva --email_root firstname.lastname@example.org # ==> user.email = email@example.com $ ppgit ara nva --names_separator _and_ # ==> user.name = ara_and_nva (default = '+')
remark : 'ppgit' is a synonym of 'git pp' => you can write
$ git pp john andy $ git pp clear
1 - When the pairing session starts, quickly set user.name and user.email to the pair values :
$ ppgit john andy firstname.lastname@example.org
=> this will update the .git/config of your project to
[user] name = andy+john email = email@example.com [user-before-ppgit] name = Your Name email = firstname.lastname@example.org
2 - When the session is finished, restore .git/config to your original local values :
$ ppgit clear
=> will restore your .git/config to :
[user] name = Your Name email = email@example.com
3 - TIP : create unique email addresses for each pair based on a common address pattern
$ ppgit --email_root firstname.lastname@example.org
=> you can use the short syntax :
$ ppgit bob al $ ppgit dan cid
are now equivalent to :
$ ppgit bob al email@example.com $ ppgit dan cid firstname.lastname@example.org
This info is stored in ~/.gitconfig => it works for all your projects.
Tip : use 1 gmail address + n aliases, so you can choose 1 unique gravatar for each pair (see 1st illustration above) :
# 1: create the gmail address : # email@example.com # 2: use it as a base for your PP pairs : # $ ppgit --email_root firstname.lastname@example.org # 3: on gravatar.com, upload and associate an avatar/pair-mugshot with each pair email address. # ex: upload 1 image for email@example.com # upload 1 image for firstname.lastname@example.org # upload 1 image for email@example.com
$ gem install ppgit
You are warned when a new version is available :
== Note on Patches/Pull Requests
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don't break it in a future version unintentionally.
- Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
- Send me a pull request. Bonus points for topic branches.
Copyright (c) 2010 Alain Ravet. See LICENSE for details. ·