How it works...

The git am command takes the mailbox file specified in the input and applies the patch in the file to the files needed. Then, a commit is recorded using the commit message and author information from the patch. The committer identity of the commit will be the identity of the person performing the git am command. We can see the author and committer information with git log, but we need to pass the --pretty=fuller option to also view the committer information:

$ git log -1 --pretty=fuller
commit 45e49d0c4fcd44b73e11d61e025a62ab2655e42d (HEAD -> master)Author: John Doe <john.doe@example.com>AuthorDate: Wed Apr 9 21:50:18 2014 +0200Commit: John Doe <john.doe@example.com>CommitDate: Sun Jun 3 21:58:46 2018 +0200Adds functionality ...

Get Git Version Control Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.