I normally upload my files to Github repository through the web interface. I accidentally uploaded a file to Github repository recently and this file contains information which I don't want others to see. Now, this private info is permanently recorded in the commit history.
How can I delete this specific commit from Github?
EDIT: The commit history was created through the file upload website of github. It was not created using git.
I will answer my own question. Credit goes to sasha-dev for his comment.
Here is what I did.
git reset --hard HEAD~1 # remove last commit
Or the goal is to remove a specific commit, find out the commit hash
git reset --hard <commit hash>~
Next step is to force push the locally made changes to the remote github repository. Run this command;
git push -f
Commits will be removed from github repository at this point.