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

First:

git filter-branch --force --index-filter \ 'git rm --cached --ignore-unmatch <myfile>' \ --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 your must delete all tags






Комментарии