Remove Lots of Deleted Files from Git at Once

Best Git command ever?

This little gem will remove multiple deleted files from Git with one (sadly not very memorable) command.

git rm `git status | grep deleted | awk '{print $3}'`

I definitely owe credit for this to someone somewhere but I took note of it a very long time ago. Since it’s been indispensable, I figured I should spread the love. So thanks be to you, whoever you are, magical Git wizard.

Leave a Reply

Your email address will not be published. Required fields are marked *