Remove lots of files in a git commit
We've all been there. Deleted a bunch of files from a git repo and wondering if you need to git rm every file individually before you commit.
You don't need to! This little trick can be used to stage all of your deletions.
git rm $(git ls-files --deleted)
Written by Greg Roodt
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#