Remove Settings.txt from a Public GitHub Repo
- Install Java and add it to your PATH (e.g.
C:\Program Files (x86)\Java\jre7\bin
) - Download http://rtyley.github.io/bfg-repo-cleaner/ into your Downloads folder (for this example).
- Follow the Usage instructions at the above link. E.g:
cd "C:\Users\BigFont\Downloads" git clone --mirror https://github.com/bigfont/orchard-cms-modules-and-themes.git java -jar .\bfg-1.11.7.jar --delete-files Settings.txt orchard-cms-modules-and-themes.git cd .\orchard-cms-modules-and-themes.git git reflog expire --expire=now --all git gc --prune=now --aggressive git push
Gotchas
- BFG is case sensitive (I think). I.e. if you put settings.txt it will not delete Settings.txt
- If you want to delete something, it must NOT be in your current commit – i.e. your current commit MUST BE CLEAN.
Todo
- Settings.txt
- App_Data
- Media
See also
- https://help.github.com/articles/remove-sensitive-data
- http://rtyley.github.io/bfg-repo-cleaner/
- http://stackoverflow.com/questions/15796855/java-is-not-recognized-as-an-internal-or-external-command (as usual, Jon Skeet’s answer is very thorough).