Created
September 18, 2018 19:47
-
-
Save mdyzma/8c3250d90ac87458a9f7e2869dd6e8bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat .gitignore | while read line | |
do | |
if [[ $line == *#* ]] | |
then | |
echo #skip | |
else | |
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch '"$line" --prune-empty --tag-name-filter cat -- --all | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment