Pipe git diff to git checkout <p>If I delete a file, I can revert it in git with:</p> <pre><code>git checkout filename </code></pre> <p>If I want to revert all deleted files, I can list them with:</p> <pre><code>git diff --diff-filter=D --name-only </code></pre> <p>What I then want to do is restore them, but</p> <pre><code>git diff --diff-filter=D --name-only | git checkout </code></pre> <p>Doesn't work, it only repeats the list to stdout, and git checkout seems to receive no input. Ditto for | git checkout HEAD -- and so on.</p> <p>I've tried this in Windows Command Prompt, in Powershell, and in Git Bash, with the same result each time.</p> <p>How do I correctly pipe input to git checkout?</p>