Pear is command line utility used while pairing to ensure that each programmer is reflected in the git commits. Pear is inspired by Hitch.
On OSX:
$ brew tap hashrocket/formulas && brew install hashrocket/formulas/pear
For Linux we intend to be distributed via apt-get, until then, either download the latest release from github, or if you have the Go toolchain available use:
$ make prepare
$ make build
to compile the binary.
$ pear chriserin derekparker
When prompted, enter the developer's full name. This changes the local git configuration (configuration per git repository).
$ pear
Pear with no arguments will let you know what programmers are configured with git.
$ pear chriserin
Will change the git configuration to use just your id.
$ pear -u
This will unset local user configuration and fall back to the global configuration.
$ pear chriserin derekparker briandunn jackchristenson jonallured andrewdennis joshdavey
Will let you setup your git configuration to reflect all the programmers that have contributed to a commit.
$ pear --email [email protected]
OR
$ pear chriserin derekparker --email [email protected]
Will configure the email associated with commits, the programmers involved will be listed as plus delimited metadata in the email address, like:
$ pear --global chriserin derekparker
Will configure git globally so that the contributing programmers will be credited in commits across all projects and repositories.
Pear works by changing your local git configuration, the configuration for a specific repository. Pear stores the full name of each developer in the ~/.pearrc so that a programmer will only be prompted once for his/her full name.
If your workflow or your organization's workflow requires that the git author and git committer for commits should differ, you can change the following environment variables:
GIT_COMMITTER_NAME
and
GIT_COMMITTER_EMAIL
These environment variables override the details provided by the git configuration. At Hashrocket, we use "Hashrocket Workstation" as the GIT_COMMITTER_NAME
to provide a little bit more detail about where the commit is coming from.