Reputation: 1674
I have a Git patch consisting 6 files.
I want to apply only rrr.php from the .patch
file consisting the above files
git-apply
command includes an --exclude
arg, but not --include
.
How can I apply only rrr.php from the .patch
file?
Upvotes: 17
Views: 12565
Reputation: 141928
You say:
git-apply
command includes an--exclude
arg, but not--include
The git-apply
(1) Manual Page says:
--include=<path-pattern>
Apply changes to files matching the given path pattern. This can be useful when importing patchsets, where you want to include certain files or directories.
Try:
git apply --include=rrr.php some.patch
Verified with Git version 1.8.4.
Upvotes: 25