Bfg-repo-cleaner: Deleting specific paths

Created on 5 Feb 2015  路  8Comments  路  Source: rtyley/bfg-repo-cleaner

First off - great library!! Thanks for sharing.

Question - We have a repository where we have a v8 directory in two locations - One that we would like to delete, and one that we would like to keep. AFAIK this works only on directory names. Is there any way to get paths to work (e.g. /libs/v8) ?

Most helpful comment

@rtyley did you find time to implement this? Maybe your kids are in college now ?

All 8 comments

Hi @dwabyick, glad you like the BFG. The feature you're talking about - path-dependent operations - is something users have been asking for - see also https://github.com/rtyley/bfg-repo-cleaner/issues/12#issuecomment-14579119 - and that I've been wanting to do, for a long time.

I've spent a long time thinking about it, and about a month ago decided that there _is_ an approach that I think I would be able to implement, given about a week of dev time. I don't have that time- I've got two tiny children who need looking after! - so have started a fundraiser to make taking the time from work possible. If you'd like to support the development of this feature, take a look here:

https://www.bountysource.com/teams/bfg-repo-cleaner/fundraiser

Hi there,

I have written a tool to extend bfg-repo-cleaner functionalities: https://gitlab.com/ercom/dct4git
This tool accept advanced conditions and can use a combination of elements like path, regex and file size

@rtyley did you find time to implement this? Maybe your kids are in college now ?

@rtyley It would be useful to be able to delete specific paths. For example, if you have a lot of auto-generated header files in a specific directory. Obviously you don't want to remove all header files, so you want to narrow it to a specific directory.

For example: bfg --delete-files protocol/*.h my-repo.git

Hello from 2020!

This is still a want :)

Shame this hasn't had any love for five years.

Bfg is useless to me without this. I need to clean files at a specific path like "one/two/foo.out" but not "three/four/foo.out". At present Bfg simply runs amok when given a "-D foo.out" argument. Limit the match using blob IDs? 馃憥

Was this page helpful?
0 / 5 - 0 ratings