snipt

Ctrl+h for KB shortcuts

Bash

Restore deleted files from a git repo

$ git log --diff-filter=D --summary
$ git revert $commit
https://snipt.net/embed/722c08cd56925de7d35655e0ff69673c/
/raw/722c08cd56925de7d35655e0ff69673c/
722c08cd56925de7d35655e0ff69673c
bash
Bash
2
2019-08-20T20:46:01
True
False
False
/api/public/snipt/16207/
restore-deleted-files-from-a-git-repo
<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></span><span id="L-1"><a name="L-1"></a>$ git log --diff-filter<span class="o">=</span>D --summary </span><span id="L-2"><a name="L-2"></a>$ git revert <span class="nv">$commit</span> </span></pre></div> </td></tr></table>
git