Note. First you can see what your patch will do:
First statistics:
git apply --stat a_file.patch
Then a trial run to detect errors:
git apply --check a_file.patch
Finally, you can use git am to apply your patch as a commit: it allows you to sign the applied patch.
This may be useful for future reference.
git am --signoff < a_file.patch
See an example in this article :
In your git log, you will find that the commit messages contain a "Signed" tag. This tag will be read by Github and others to provide useful information on how the commit ended up in code.

VonC Feb 12 2018-10-12T00 : 00Z
source share