git apply

Apply a patch to files and/or to the index without creating a commit. See also git am, which applies a patch and also creates a commit. More information: https://git-scm.com/docs/git-apply.

git apply {{[-v|--verbose]}} {{path/to/file}}

git apply --index {{path/to/file}}

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

git apply --stat --apply {{path/to/file}}

git apply {{[-R|--reverse]}} {{path/to/file}}

git apply --cache {{path/to/file}}