How to make a patch ignore file index using "git apply"?

I am trying to apply a .patch file to my source, but it fails because the file index (10655) is older than the patch index (10755).

Now I know that I can simply change the index of the patch file, but I would like to know if there is a way to use git to ignore the differences in the index of the patch in the patch?

+4
source share
1 answer

You may find the patch application less restrictive as to what it applies to. IE, just run 'patch -p0 <file' and it should apply it, and then you can commit it.

The downside is that you lose information for creating, etc., so you can use --author along with commit.

+4
source

Source: https://habr.com/ru/post/1381753/


All Articles