snipt

Ctrl+h for KB shortcuts

Text only

git and svn diff & patch

1
2
3
4
5
6
7
8
#Once you've made your changes
# For git
git diff --no-prefix > file.diff
# Svn
svn diff > my-diff-file.diff

# Now apply the patch
patch -p0 --dry-run < asq-jun25-view.yml.diff 
https://snipt.net/embed/8e3e3dddba1421c8744345ea2c365fd9/
/raw/8e3e3dddba1421c8744345ea2c365fd9/
8e3e3dddba1421c8744345ea2c365fd9
text
Text only
10
2019-06-26T06:04:30
True
False
False
Jul 18, 2012 at 04:56 PM
/api/public/snipt/42789/
subversion-diff-patch
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>#Once you&#39;ve made your changes </span><span id="L-2"><a name="L-2"></a># For git </span><span id="L-3"><a name="L-3"></a>git diff --no-prefix &gt; file.diff </span><span id="L-4"><a name="L-4"></a># Svn </span><span id="L-5"><a name="L-5"></a>svn diff &gt; my-diff-file.diff </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a># Now apply the patch </span><span id="L-8"><a name="L-8"></a>patch -p0 --dry-run &lt; asq-jun25-view.yml.diff </span></pre></div> </td></tr></table>
diff, git, patch, svn