Max Koretskyi
Max Koretskyi

Reputation: 105547

Specify to which file a patch should apply

For example, I have the following git patch:

diff --git a/Gruntfile.js b/Gruntfile.js
index d220f35..176c71a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -10,7 +10,7 @@ module.exports = function (grunt) {
                         src: ['index.less', '!**/components/**'],
                         dest: 'build/development/css',
                         ext: '.css',
-                        cleancss: true
+                        cleancss: false
                     }
                 ]
             },

As you can see, it contains the path of the file onto which these changes should be applied (Gruntfile.js). Is there any way to apply this patch to the file other than the one specified in the patch?

Upvotes: 1

Views: 53

Answers (1)

chepner
chepner

Reputation: 532122

You should be able to specify directly which file is to be patched:

$ patch not-Gruntfile-but-close.js unset-cleancss.patch

Upvotes: 1

Related Questions