bids-standard / BEP028_BIDSprov

Organizing and coordinating BIDS extension proposal 28 : BIDS Provenance
https://bids.neuroimaging.io/bep028
Creative Commons Attribution 4.0 International
4 stars 12 forks source link

Rewriting history of this repo #131

Closed cmaumet closed 6 months ago

cmaumet commented 6 months ago

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

satra commented 6 months ago

go for it. using git filter i'm assuming to preserve everything else.

cmaumet commented 6 months ago

Thanks for the quick reply! Yes preserving the full history contributors commits etc. except the png.

bclenet commented 6 months ago

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
cmaumet commented 6 months ago

@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?

bclenet commented 6 months ago

@cmaumet the command lines were indeed applied to the current repo.

cmaumet commented 6 months ago

Fantastic thank you @bclenet!