How to create a patch file on windows?
-
22-07-2019 - |
Question
On windows, I have two source files and want to create a patch with difference, like this one. But I'm unsure, what format this patch is and what app to use in order to create it? GNU diff output is very different from the patch I can see in the link above.
Solution
The output format is called "unified diff", it can be generated using diff -u
.
OTHER TIPS
Try WinMerge. You'll find a patch generator in the "Tools" menu.
WinMerge is the best tool for windows. To create a patch file, you need to do the following:
File>Open
-- Here you open the files for which you are generating patch file.
Tools>Generate Patch
-- Here you specify the path where to save the patch file. And WinMerge will save patch file for you.
WinMerge (http://winmerge.org/) is what you need. You also can compare whole file trees with this tool, which is an absolute must-have for some people.
The UnxUtils package offers lot of useful Unix tools for Windows, with a minimal impact on Windows installation (unzip, add location to path, use it).
It has a diff.exe