Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用“使修补程序忽略文件索引”;git apply";?_Git_Command - Fatal编程技术网

如何使用“使修补程序忽略文件索引”;git apply";?

如何使用“使修补程序忽略文件索引”;git apply";?,git,command,Git,Command,我正在尝试将.patch文件应用于我的源,但失败了,因为我的文件索引(10655)比补丁索引(10755)旧 现在我知道我可以修改补丁的文件索引,但我想知道是否有任何方法可以使用git使补丁忽略文件索引的差异?您可能会发现补丁应用程序对其应用的内容没有那么严格。也就是说,只要运行“patch-p0

我正在尝试将.patch文件应用于我的源,但失败了,因为我的文件索引(10655)比补丁索引(10755)旧


现在我知道我可以修改补丁的文件索引,但我想知道是否有任何方法可以使用git使补丁忽略文件索引的差异?

您可能会发现
补丁
应用程序对其应用的内容没有那么严格。也就是说,只要运行“patch-p0 缺点是您将丢失创作信息等,因此您可能希望在提交时使用--author