Friday, April 14, 2017

Deleting file from history of git-repository(all commites)

First:
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch ' \
--prune-empty --tag-name-filter cat -- --all
Replace <myfile> on your file or directory(<dir>/*)

Next:
git push origin --force --all
git push origin --force --tags
Sometimes you must delete all tags