Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup only takes place after second run #496

Open
p41l1 opened this issue Aug 30, 2023 · 1 comment
Open

Cleanup only takes place after second run #496

p41l1 opened this issue Aug 30, 2023 · 1 comment

Comments

@p41l1
Copy link

p41l1 commented Aug 30, 2023

We are running the bfg tool to remove a directory and a binary file from history via this command:
java -jar ../bfg-1.14.0.jar --delete-folders 'docu' --delete-files 'binary.JAR' --no-blob-protection dir-of-git-repo.git

After running it the report states that the binary has been deleted.
Checking the history it is still displayed and as well the folder:
git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort --numeric-sort --key=2 | cut -c 1-12,41- | $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest

So we executed this
git reflog expire --expire=now --all && git gc --prune=now --aggressive

and ran the bfg as stated above again. The execution was then much faster and files and the folder were gone.

We tried several environments like GIT Bash, Powershell and WSL2 with Ubuntu but no change in the behaviour as well several combinations of parameters.

As we try to cleanup several repos this occurs only for a few of them. We had the same behaviour even running the command multiple times on a fresh mirrored clone without "--no-blob-protection" and by specifying the other parameters in a single run by executing bfg multiple times.

@newworldiscome
Copy link

Plz helping my divace data baset changed and I'm not programer I do not what happened this problem fix I'm need for help back default my phone and data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants