snipt

Ctrl+h for KB shortcuts

Bash

Diff of two directories and generate a patch

#Diff of two dirs and generate a patch.
diff -urPp dir.old/ dir.new/ > newpatch.patch
https://snipt.net/embed/a374ca697edc9fa7331f2882c902a270/
https://snipt.net/raw/a374ca697edc9fa7331f2882c902a270/
a374ca697edc9fa7331f2882c902a270
bash
Bash
2
2016-09-25T06:30:13
True
False
False
Mar 18, 2013 at 04:06 PM
/api/public/snipt/57879/
diff-of-two-directories-and-generate-a-patch
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c">#Diff of two dirs and generate a patch.</span> </span><span id="L-2"><a name="L-2"></a>diff -urPp dir.old/ dir.new/ &gt; newpatch.patch </span></pre></div> </td></tr></table>
diff, patch

Text only

Git: apply patch not working

git init // You have to be on git root to apply it otherwise the path won't be right
git apply your_patch.patch
https://snipt.net/embed/60cfb2d9275897af5a042161d7d3a2be/
https://snipt.net/raw/60cfb2d9275897af5a042161d7d3a2be/
60cfb2d9275897af5a042161d7d3a2be
text
Text only
2
2016-09-23T17:54:57
True
False
True
Mar 14, 2013 at 06:25 AM
/api/public/snipt/57620/
git-apply-patch-not-working
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>git init // You have to be on git root to apply it otherwise the path won&#39;t be right </span><span id="L-2"><a name="L-2"></a>git apply your_patch.patch </span></pre></div> </td></tr></table>
apply, git, patch
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.