I want to take a patch and apply it in another repository, both the local repository are up to date. I just changed indentation and few lines in the file and took patch using git diff and applied it in another local repository. The patch applied successfully along with the indentation changes. But I need only the changes in code to be applied. So I tried git diff -w and took a patch. This patch was fine only with the code changes. Changes due to indentation were omitted. But when tried to apply the patch. Patch is not getting applied. It’s showing error in the part which I haven't touched. Don't know what’s actually happening.
If I replaced the error part with what is actually in patch. This error part is applied and again showing error in next few lines. Similarly it continues.