git - Remove files from history by specific extension -
i have accidently committed files shouldn't in repository. want remove files history. have in common is, have file extension *.test.
i tried apply index filter expects specific file name.
git filter-branch --force --index-filter 'git rm --chached --ignore-unmatch -r *.test' --prune-empty -- --all
is possible files in 1 step without specifying them manually?
it's unbelievable, had typo in script, think have escape asterisk too.
so script working me
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch -r \*.test' --prune-empty -- --all
Comments
Post a Comment