DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Remove Deleted Files From Git
// Via http://www.jamesrobey.com/bash-script-to-remove-deleted-files-from-git/
for i in `git status | grep deleted | awk '{print $3}'`; do git rm $i; done






Comments
Snippets Manager replied on Thu, 2011/05/19 - 11:25am
Snippets Manager replied on Sun, 2011/04/17 - 12:27pm
Snippets Manager replied on Wed, 2009/07/15 - 5:05am
$ git rm $(git ls-files -d)Snippets Manager replied on Mon, 2012/05/07 - 2:58pm
Snippets Manager replied on Tue, 2009/01/06 - 3:21am
git add -uIt deletes all removed files and updates what was modified. Just doesn't add new files. It's better because if you have a file named "deleted.txt" it will also be removed.Snippets Manager replied on Tue, 2008/06/10 - 4:11pm
Snippets Manager replied on Tue, 2008/06/10 - 4:11pm
Snippets Manager replied on Tue, 2008/06/10 - 4:11pm