git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch path_to_file" HEAD git push --force