Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to create a Drupal project patch using diff, but not using Git

I am trying to create a patch file by comparing Drupal projects on a project level, not on the individual file level, by using the Unix terminal command 'diff'.

Here is the syntax:

diff drupalprojectv1 drupalprojectv2 > patch.patch

When I view the patch file, all I see is the differences between the directories and subdirectories, changes in codes in individual files are not compared. If I do it with individual files, such as

diff somefile1.html.twig somefile2.html.twig > patch.patch

then I can see the difference and the patch can be applied successfully.

Is there any way a patch file can be created on a project level, instead of just between individual files without using Git?

like image 517
hiew1 Avatar asked Mar 26 '26 21:03

hiew1


1 Answers

Try

diff -ruN drupalprojectv1 drupalprojectv2 > patch.patch

Refer to diff examples and documentation for more details

like image 85
Dmytro Sukhovoy Avatar answered Mar 31 '26 13:03

Dmytro Sukhovoy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!