Git big file cleaner. Really cool, really easy.

By polfilm,

  Filed under: Uncategorized
  Comments: None

Example of use:

polfilm@petersmacbook2:~/git_madcore$ java -jar ../Downloads/bfg-1.12.14.jar  --strip-blobs-bigger-than 100M controlbox.git

Using repo : /Users/polfilm/git_madcore/controlbox.git

Scanning packfile for large blobs: 1749
Scanning packfile for large blobs completed in 61 ms.
Found 1 blob ids for large blobs - biggest=118360126 smallest=118360126
Total size (unpacked)=118360126
Found 149 objects to protect
Found 10 commit-pointing refs : HEAD, refs/heads/Denis-fix-chain, refs/heads/Denis-fix-ssl, ...

Protected commits

These are your protected commits, and so their contents will NOT be altered:

 * commit 1e3682a9 (protected by 'HEAD')


Found 432 commits
Cleaning commits:       100% (432/432)
Cleaning commits completed in 598 ms.

Updating 2 Refs

    Ref                      Before     After
    refs/heads/development | 3c08c456 | 38f9abd0
    refs/heads/master      | 1e3682a9 | 30931052

Updating references:    100% (2/2)
...Ref update completed in 59 ms.

Commit Tree-Dirt History

    Earliest                                              Latest
    |                                                          |

    D = dirty commits (file tree fixed)
    m = modified commits (commit message or parents changed)
    . = clean commits (no changes to file tree)

                            Before     After
    First modified commit | ad02cdfe | 327d6762
    Last dirty commit     | b6cf4f0b | 549a928f

Deleted files

    Filename                               Git id
    spark-examples-1.5.2-hadoop2.6.0.jar | 4d798227 (112.9 MB)

In total, 50 object ids were changed. Full details are logged here:


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

Has the BFG saved you time?  Support the BFG on BountySource:

Comments are closed for this post.