Friday 12 February 2016

Reverting all deletes in Git, leaving file modifications in place

I asked how to do this on StackOverflow, 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.

No comments:

Post a Comment