I used bfg to remove all files above 100 MB so that I can push the repository to github.
The bfg does not delete what it sees as protected commit. I have searched the web but so far I have not been able to find the specific commands.
What specific git or bfg commands can I use to completely delete unwanted large files in the protected commits? The bfg provides general guidelines but I if anyone has done this, I appreciate the sequence of commands.
These are your protected commits, and so their contents will NOT be altered:
If you really want this content gone, make a manual commit that removes it,
and then run the BFG on a fresh copy of your repo.
7921ddd4ffebb65c3fe5b2df3467e4d42f1b08b2,DELETE,regular-file,dr/content/DRDirectSale.csv,131000000,
8454bc16e6dd0133005b2618d92c09a665fb7851,DELETE,regular-file,dr/content/DRRebatePaymentSale.csv,134000000,
For general usage questions you might be better to close this and ask on StackOverflow with tags bfg-repo-cleaner and git-rewrite-history.
@javabrett thanks for the reminder. I will close this question.
By the way, this is a great utility and the speed on the large repositories that we intend to transfer from gerrit to github is very fast.
For the benefit of those folks who may run into this same issue, this is what I did to accomplish the deletion.
1) Get a "mirror" of the git repository and use bfg utility to remove all file over 100 MB
2) Look at the comma separated /home/user/repo.git.bfg-report/2017-06-08/15-07-17/protected-dirt/ file that bfg creates to find the full path to those large files that bfg did not remove.
3) get a "clone" of the repository with workspace and remove all the files using "git rm" command and commit the delete.
4) Run the bfg utility in this "clone" repository". Now bfg will delete the files.
@stalebbeik Thanks for the summary! Do I need to remove the files (step 3) in every branch?
Most helpful comment
@javabrett thanks for the reminder. I will close this question.
By the way, this is a great utility and the speed on the large repositories that we intend to transfer from gerrit to github is very fast.
For the benefit of those folks who may run into this same issue, this is what I did to accomplish the deletion.
1) Get a "mirror" of the git repository and use bfg utility to remove all file over 100 MB
2) Look at the comma separated /home/user/repo.git.bfg-report/2017-06-08/15-07-17/protected-dirt/ file that bfg creates to find the full path to those large files that bfg did not remove.
3) get a "clone" of the repository with workspace and remove all the files using "git rm" command and commit the delete.
4) Run the bfg utility in this "clone" repository". Now bfg will delete the files.