I checked in (into github) some sensitive files by mistake. To remediate this, I followed the instructions here and ran the commands:
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch settings.json" --prune-empty --tag-name-filter cat -- --all
echo "settings.json" >> .gitignore
git add .gitignore
git commit -m "Add settings.json to .gitignore"
git push origin --force --all
git push origin --force --tags
git for-each-ref --format="delete %(refname)" refs/original | git update-ref --stdin
git reflog expire --expire=now --all
git gc --prune=now
I can however go to my commit history to see the deleted file.
To fix this issue, how can I delete the file from github commit history?