Git: Easily Remove Multiple Files After Deletion

I almost always forget to “git rm <file>” before deleting it.  Here’s a quick way to pull deleted files from a Git repository and remove them:

git rm $(git ls-files --deleted)
Advertisements