<p>Given a (source) patch file, what's the easiest way to apply this patch on the source files under Windows?</p>

<p>A GUI tool where I can visually compare the unchanged-changed source lines would be great.</p>

[{'answer_id': 19614, 'author': 'SCdF', 'author_id': 1666, 'author_profile': 'https://Stackoverflow.com/users/1666', 'pm_score': 4, 'selected': True, 'text': '<p><a href="http://gnuwin32.sourceforge.net/packages/patch.htm" rel="noreferrer">Patch for Windows</a> is what you\'re looking for.</p>\n'}, {'answer_id': 19615, 'author': 'Philip Reynolds', 'author_id': 1087, 'author_profile': 'https://Stackoverflow.com/users/1087', 'pm_score': -1, 'selected': False, 'text': '<p>WinMerge is awesome.</p>\n\n<p><a href="http://winmerge.org/" rel="nofollow noreferrer">http://winmerge.org/</a></p>\n'}, {'answer_id': 8056005, 'author': 'Nicolas Thery', 'author_id': 903840, 'author_profile': 'https://Stackoverflow.com/users/903840', 'pm_score': 4, 'selected': False, 'text': '<p>A good way to apply a patch file under Windows OS is using Git.\nAs I understood, Git is a version control solution like SVN.</p>\n<p><strong>Here is a guideline to apply a patch :</strong></p>\n<ul>\n<li>First of all, download the latest release of the Windows Git Edition here :\n<a href="http://code.google.com/p/msysgit/downloads/list?can=3&amp;q=official%20Git" rel="nofollow noreferrer">GIT</a></li>\n<li>With the cmd prompt, change directory to the patch file and files to patch</li>\n<li>Now you can use the following command line :</li>\n</ul>\n<blockquote>\n<pre><code>git apply --ignore-space-change --ignore-whitespace --whitespace=nowarn file.patch\n</code></pre>\n</blockquote>\n'}, {'answer_id': 29050457, 'author': 'VonC', 'author_id': 6309, 'author_profile': 'https://Stackoverflow.com/users/6309', 'pm_score': 3, 'selected': False, 'text': '<p>Not that since Git 2.3.3 (March 2015), you can use <code>git apply --unsafe-paths</code> to use git apply outside a git repo.</p>\n\n<p>See <a href="https://github.com/git/git/commit/5244a31039dbb3fe0d544fc56100d0ccbc653131" rel="noreferrer">commit 5244a31</a> by <a href="https://github.com/gitster" rel="noreferrer">Junio C Hamano (<code>gitster</code>)</a></p>\n\n<p>"<code>git apply</code>" was not very careful about reading from, removing, updating and creating paths outside the working tree (under <code>--index</code>/<code>--cached</code>) or the current directory (when used as a replacement for GNU patch).</p>\n\n<p>The documentation now includes:</p>\n\n<pre><code>--unsafe-paths:\n</code></pre>\n\n<blockquote>\n  <p>By default, a patch that affects outside the working area (either a Git controlled working tree, or the current working directory when "<code>git apply</code>" is used as a replacement of GNU patch) is rejected as a mistake (or a mischief).</p>\n  \n  <p>When <code>git apply</code> is used as a "better GNU patch", the user can pass the <code>--unsafe-paths</code> option to override this safety check.<br>\n  This option has no effect when <code>--index</code> or <code>--cached</code> is in use.</p>\n</blockquote>\n\n<p>So if you have <a href="https://github.com/msysgit/msysgit/releases" rel="noreferrer">git installed</a>, <code>git apply</code> could help, even outside of any git repo.</p>\n'}]
['https://Stackoverflow.com/questions/19611', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1630/']