Home > OS >  how to delete show diff on github
how to delete show diff on github

Time:10-28

I recently pushed a commit to GitHub that I shouldn't have, which could have contained sensitive information. Thankfully it didn't. I immediately deleted the file in question and quickly noticed that I and anyone with access to this repo can see the contents of the uploaded file if they click on the commit history and load diff. Is there any way to delete the contents of that commit so that it no longer shows up in my repository commit history?

CodePudding user response:

GitHub documents the process quite clearly.

Basic steps:

  1. Rebase your changes and remove the offending commit from your local history.
  2. Force push the rebased changes to GitHub.
  3. Contact support to have the offending commit purged from pull requests, caches and issues it might be linked to.
  • Related