hiew1
hiew1

Reputation: 1434

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?

Upvotes: 3

Views: 1068

Answers (1)

Dmytro Sukhovoy
Dmytro Sukhovoy

Reputation: 992

Try

diff -ruN drupalprojectv1 drupalprojectv2 > patch.patch

Refer to diff examples and documentation for more details

Upvotes: 3

Related Questions