Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can bfg-repo-cleaner list affected files before deleting them

From the command line option I can not see that there is a way to see what bfg will do before doing it.

If I run this command:

$ bfg --strip-blobs-bigger-than 1M --replace-text banned.txt repo.git

Can I get a list of files larger than 1M before actual deleting them?

like image 932
Martin Andersen Avatar asked May 16 '17 09:05

Martin Andersen


People also ask

What is not a valid Git repository?

A Git command needs to be run on a specific repository, so this error typically occurs when a Git command is run in a directory that Git doesn't know about. In these cases, the fix is to make sure that you are both working in the correct folder and that you set up your repository right.

What is BFG in Git?

The BFG is a simpler, faster (10 - 720x faster) alternative to git-filter-branch for cleansing bad data out of your Git repository: Removing Crazy Big Files. Removing Passwords, Credentials & other Private data.


1 Answers

See https://github.com/rtyley/bfg-repo-cleaner/issues/17 for a discussion on a dry-run feature.

Essense of my comments there: since Git makes it super-cheap to make additional local clones where you can perform test-runs of BFG, and this provides you with real output you can verify in addition to a report, that is superior to having a report-only or dry-run mode.

Just make an additional local clone of the repo, run BFG, then read the reports produced and examine the repo.

like image 182
javabrett Avatar answered Oct 18 '22 09:10

javabrett