Pair programming, which is a common practice in modern software teams,
means two people are responsible for the work developed.
But all the commits in Git's history are normally only in one persons details.

By attributing both pair members praise (and blame ;p) and most likely future questions can be
directed to both, instead of just the owner of the machine it was developed on.

As Git does not support this out of the box, there are several work-arounds:

Alternate commits

Alternate commits between the members randomly or in alternate order.

Separate author and commiter

Use the separate author and committer git settings to split attributions. E.g.:

Git_scripts by Pivotal

This howto will show how to use github.com/pivotal/git_scripts
by Pivotal, which do support the alternate commit authors solution,
but more importantly it also supports a 3rd option: Merge.

Merge the committers

Merging the both pair members as one committer means combining both names as one,
and a still valid email address that represents both members. E.g.

GIT_COMMITTER_NAME="Sue Jones and John Smith"
GIT_COMMITTER_EMAIL="sue.jones+john.smith@example.com"

As you can see the merge option combines the names and appends the email alias with a + separating.
This makes it a valid email address which is still Sue's as all mail servers will ignore what is between + and @.

If prefix is not empty it will prefix emails with its value. E.g. in the above devs will result in:

GIT_COMMITTER_EMAIL="devs+sue.jones+john.smith@example.com"

So that all emails will end up in devs@example.com, which may be an alias for the whole dev team.
A blank prefix may be preferable so that the email addresses generated are sent to at least one of the pair. (The pair order is alphabetic)

If global is true, this will set these values globally across all git repositories on your machine.
Using the --global option will do the same.

Alternatively create another script that loops around an environment variable of projects or root folder to pair on.

Start pairing

If John and Alun are pairing on a project then use their initials with Git pair: