# Reverting all deletes in Git, leaving file modifications in place

I asked how to do this on [StackOverflow](http://stackoverflow.com/questions/35362525/pipe-git-diff-to-git-checkout), and the answer is:

git diff --diff-filter=D --name-only | xargs git checkout

You need the "xargs": just piping the output of "diff" to "checkout" doesn't work.
