Welcome to Shaun Luttin's public notebook. It contains rough, practical notes. The guiding idea is that, despite what marketing tells us, there are no experts at anything. Sharing our half-baked ideas helps everyone. We're all just muddling thru. Find out more about our work at bigfont.ca.

Remove Settings.txt from a Public GitHub Repo

Tags: orchard-cms

  1. Install Java and add it to your PATH (e.g. C:\Program Files (x86)\Java\jre7\bin)
  2. Download http://rtyley.github.io/bfg-repo-cleaner/ into your Downloads folder (for this example).
  3. 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