bids-standard / BEP028_BIDSprov

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

Rewriting history of this repo #131

Closed cmaumet closed 1 month ago

cmaumet commented 1 month 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 1 month ago

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

cmaumet commented 1 month ago

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

bclenet commented 1 month 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 1 month 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 1 month ago

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

cmaumet commented 1 month ago

Fantastic thank you @bclenet!