CDCgov / phdi

https://cdcgov.github.io/dibbs-site/
Creative Commons Zero v1.0 Universal
34 stars 14 forks source link

Remove state ecrs from git history #2741

Closed austin-hall-skylight closed 3 weeks ago

austin-hall-skylight commented 4 weeks ago

What needs to be done

Remove state ecrs from git history

Why it needs to be done

Acceptance Criteria

Technical Notes

Reference this article.

Additional context

BobanL commented 4 weeks ago

Test run:

See the changes here: https://github.com/BobanL/phdi

Commands ran:

git clone --mirror git@github.com:BobanL/phdi.git
java -jar bfg.jar --delete-folders "{containers/ecr-viewer/seed-scripts/baseECR/ME}" phdi.git
cd phdi.git
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git push
BobanL commented 3 weeks ago

This has been completed. As a note, BFG did not clean up the refs to the merged pull requests which left the files still visible and in history. We pivioted to using git filter-repo instead.

git filter-repo --invert-paths --path containers/ecr-viewer/seed-scripts/baseECR/KY --path containers/ecr-viewer/seed-scripts/baseECR/TN --path containers/ecr-viewer/seed-scripts/baseECR/ME