git-apply
Apply a patch to files and/or to the index without creating a commit. tldr-pages
On several platforms
Several platforms
Print messages about the patched files
git apply --verbose path/to/fileIdentifyApply and add the patched files to the index
git apply --index path/to/fileIdentifyApply a remote patch file
curl --location https://example.com/file.patch | git applyIdentifyTrips 1 Sigma rule: lowCurl Usage on Linux by Nasreddine Bencherchali (Nextron Systems)
Output diffstat for the input and apply the patch
git apply --stat --apply path/to/fileIdentifyApply the patch in reverse
git apply --reverse path/to/fileIdentifyStore the patch result in the index without modifying the working tree
git apply --cache path/to/fileIdentify