Created
June 4, 2019 21:26
-
-
Save czj/2e4e6d755ee11a93655d083174ab069d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rewrite all commits without a certain directory | |
java -jar ~/Downloads/bfg-1.13.0.jar --delete-folders "vcr_cassettes" | |
# Remove garbage | |
git reflog expire --expire=now --all && git gc --prune=now --aggressive | |
# Push to your repo | |
git remote add origin git@github.com:my-org/my-repo.git | |
git push -u origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Help came from https://help.github.com/en/articles/removing-sensitive-data-from-a-repository#using-filter-branch