Some time ago I added info(files) that must be private. Removing from the project is not problem, but I also need to remove it from git history.
git
I use Gi
I read this GitHub article, which led me to the following command (similar to the accepted answer, but a bit more robust):
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA" --prune-empty --tag-name-filter cat -- --all