The git apply command is for applying patch information from the Git Diff command.
| Command | Description |
|---|---|
git apply patchfile.txt |
apply the patch file to the current branch, applied changes are not committed |
git apply --stats patchfile.txt |
test if the patch file can be applied and produce statistics |
git apply --check patchfile.txt |
test if the patch file can be applied without errors |
git apply --reject patchfile.txt |
apply as much of the patch file as possible, writing rest to a .rej file |
See also: