My friend made a config file, holding our apikey/token/secrets, and a .gitignore to ignore said file. Someone accidentally pushed to the master branch with the config file saved as another name and is now showing.
I was wondering if there was a way to delete that commit and the history of that commit.
I have seen this (below) and I understand this will delete the commit and re-push everything. But it still shows the config info via history/changes:
git reset --hard hash#
git push -f origin branch