Use BFG to clear secret Git history
Pasted those nuclear launch codes in to a file and committed the damn thing to Git again? Well you can lose a bunch of time doing it with plain git commands or download BFG, then use these simple commands once you've pushed a clean version of the file:
cd /tmp git clone --mirror https://github.com/.../something.git java -jar ~/Downloads/bfg-1.12.3.jar --delete-files file_to_eradicate.txt something.git cd something.git git reflog expire --expire=now --all && git gc --prune=now --aggressive git push
Now delete your main repository and get a fresh clone from GitHub or wherever.