I've accidentally made a commit that had some sensitive information that should not be committed. Here's what the commit history looks like: Git commits
I've removed some identifying information, but basically I want to delete commit C. Ideally, I would like to keep commit A and B while doing this, but if it is not possible, then going back to commit D would be acceptable.
Note: This is in the master branch if it makes a difference.
I've tried
git rebase D
git push
I've also tried the instructions here: http://www.clock.co.uk/blog/deleting-a-git-commit
But neither of them have provided the desired result. I'm sure that I'm doing something wrong.