Closed cmaumet closed 6 months ago
go for it. using git filter i'm assuming to preserve everything else.
Thanks for the quick reply! Yes preserving the full history contributors commits etc. except the png.
This was done using BFG repo-cleaner and the following procedure :
# Clone the repo, using mirror option
git clone --mirror git@github.com:bids-standard/BEP028_BIDSprov.git
# Run BFG to clean history
java -jar bfg-1.14.0.jar --delete-files *.png BEP028_BIDSprov.git/
# alternatively, if you want to remove the .png images in the current revision (HEAD)
java -jar bfg-1.14.0.jar --no-blob-protection --delete-files *.png BEP028_BIDSprov.git/
# Physically delete the references BFG removed from the hisotry
cd BEP028_BIDSprov.git
git reflog expire --expire=now --all && git gc --prune=now --aggressive
# Push the changes
git push
@bclenet -- thanks! It is difficult for me to comment on the code you used but if you have an instance of a repo were this was applied I would be happy to have a look -- or was this applied already to the current repo?
@cmaumet the command lines were indeed applied to the current repo.
Fantastic thank you @bclenet!
Hi everyone!
Juste a quick note that @bclenet is currently looking into rewriting the history of this repo in order to remove the png files that make the repo >1GB.
ping @satra