gitcommandgit-indexgit-apply

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


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

Now I know that I can just modify the patch's file index but I would like to know if there is any way using git to make a patch ignore the file index differences?


Solution

  • You might find the patch application less strict about what it is applying to. IE, just run 'patch -p0 < file' and it should apply it and then you can commit it.

    The downside is that you'll loose the authoring information, etc, so you might want to use --author along with the commit.