git-apply

git-apply

The manual page and help for the git apply Linux command. The git apply command reads the supplied diff output (ie "a patch") and applies it to the files. When running from a subdirectory of a package, fixed paths outside the directory are ignored. With the --index option, the patch is also added to the index, and with the --cached option, only to the index. Without these options, the command only applies the patch to the files and does not require them to be in a Git repository.