Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joeyklee/5625714b3a223f56120f66acd11093e8 to your computer and use it in GitHub Desktop.
Save joeyklee/5625714b3a223f56120f66acd11093e8 to your computer and use it in GitHub Desktop.
using BFG to delete a big file in a repo

how-to-remove-a-big-file-from-git-using-bfg

install bfg

brew install bfg

delete the file

cd path-to-your-repo
bfg --delete-files your-big-file.fgb

if it is successful, youll see:

BFG run is complete! When ready, run: git reflog expire --expire=now --all && git gc --prune=now --aggressive

then run:

git reflog expire --expire=now --all && git gc --prune=now --aggressive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment