git am

Apply patch files and create a commit. Useful when receiving commits via email. See also git format-patch, which can generate patch files. More information: https://git-scm.com/docs/git-am.

git am {{path/to/file.patch}}

curl -L {{https://example.com/file.patch}} | git apply

git am --abort

git am --reject {{path/to/file.patch}}