Skip to content

Instantly share code, notes, and snippets.

@hroncok
Created January 7, 2013 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hroncok/4478765 to your computer and use it in GitHub Desktop.
Save hroncok/4478765 to your computer and use it in GitHub Desktop.
Used for deleting (git rm) already deleted (rm) files. Added as git alias: rmdeleted = !gitrmdelted
#!/bin/bash
for FILE in `git status | grep deleted | awk '{print $3}'`; do
echo $FILE
git rm $FILE
done
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment