Описание тега git-apply

Git command that applies a patch to files and/or to the index.

This command reads the supplied diff output (i.e. "a patch") and applies it to files.

With the --index option the patch is also applied to the index, and with the --cached option the patch is only applied to the index. Without these options, the command applies the patch only to files, and does not require them to be in a git repository.

This command applies the patch but does not create a commit. Use git-am to create commits from patches generated by git-format-patch and/or received by email.