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

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -