Two folders, create a diff file:
diff -r folder1/ folder2/ -iEZbBuN > thediff.diff
The -N
treats notexisting files as empty. That way, diff will continue to walk through directories even if a file is not found.
This creates a patch to patch changes from folder1
to folder2
.
Filter it to only include php files:
filterdiff -i '*.php' thediff.diff > thediff-filtered.diff
These can then be used with phpstorms "apply patch": right click on diff file -> apply patch
diff -r folder1/ folder2/ -iEZbBuNq
-q
Option.