Skip to content

Instantly share code, notes, and snippets.

@czj
Created June 4, 2019 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save czj/2e4e6d755ee11a93655d083174ab069d to your computer and use it in GitHub Desktop.
Save czj/2e4e6d755ee11a93655d083174ab069d to your computer and use it in GitHub Desktop.
# 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
@czj
Copy link
Author

czj commented Jun 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment