Git
To remove a file from the repository’s commit history
This approach will rerun the whole commit history and removes all tags in the process. The end result is a clean repository with all the commits.
$ git filter-branch --index-filter 'git update-index --remove BadFile' master
To push the changes back to the remote repo:
$ git push origin master --force
Clean up and reclaim the space:
$ rm -rf .git/refs/original/ $ git reflog expire --all $ git gc --aggressive --prune