Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wingsuitist/501731544cd719c0c51a to your computer and use it in GitHub Desktop.
Save wingsuitist/501731544cd719c0c51a to your computer and use it in GitHub Desktop.
# searches for the pattern within a repo and removes every single file one by one
# attention: if the file exists twice it will be removed everyware
pattern="typo3tempbkp"
for i in `git rev-list --objects --all | sort -k 2 | cut -f 2 -d\ | uniq|grep $pattern` ; do \
java -jar ~/Google\ Drive/jf-res/bfg/bfg-1.11.8.jar --delete-files `basename $i`
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment