0

I accidentally exposed a private key in one of my files when I pushed it to github. Thankfully I got a warning email from google about my api being exposed. After I updated the file and pushed the commit, i have been unable to delete my previous commits.

Is it possible to delete previous commits on github or do I have to delete my repositoy and start all over again?enter image description here

Waleed Tariq
  • 825
  • 8
  • 19
  • I think https://stackoverflow.com/questions/22682870/git-undo-pushed-commits/36177806 will solve your issue – Maxqueue Aug 30 '21 at 01:00
  • 2
    This is a FAQ on GitHub: https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository – President James K. Polk Aug 30 '21 at 01:08

0 Answers0