Not something I learned today, but definitely useful enough to spare future searches.
It is quite often that we pair-program a task in the startup I work for.
To avoid sensitivities, share the credit and the blame, I recommend to co-author commits. All you need to do is add the following on the bottom of the commit message:
Co-authored-by: name <firstname.lastname@example.org>
Add multiple co-authors by giving each one their own line.
In case you don’t remember your user name or email type:
$ git config --global user.name dkorn $ git config --global user.email email@example.com
I frequently say that I never share blame, I never share credit, and I never share desserts!