Skip to content

Instantly share code, notes, and snippets.

@ruben-rodriguez
Created April 25, 2017 16:04
Show Gist options
  • Save ruben-rodriguez/65d727279dff7d94606acdf66762998e to your computer and use it in GitHub Desktop.
Save ruben-rodriguez/65d727279dff7d94606acdf66762998e to your computer and use it in GitHub Desktop.
Removing file history from Git
Before pruning the data update the branches head solving the problem (master / develop)
git clone --mirror https://github.com/example.git
cd git
bfg --delete-files <file>
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment