Removing multiple files from a Git repo that have already been deleted from disk

Posted by Codebeef on Stack Overflow See other posts from Stack Overflow or by Codebeef
Published on 2009-01-29T17:18:14Z Indexed on 2012/04/09 11:29 UTC
Read the original article Hit count: 298

Filed under:
|
|

I have a Git repo that I have deleted four files from using rm (not git rm), and my Git status looks like this:

#    deleted:    file1.txt
#    deleted:    file2.txt
#    deleted:    file3.txt
#    deleted:    file4.txt

How do I remove these files from Git without having to manually go through and add each file like this:

git rm file1 file2 file3 file4

Ideally, I'm looking for something that works in the same way that git add . does, if that's possible.

© Stack Overflow or respective owner

Related posts about git

Related posts about git-commit