Necessary Maintenance #13468
larpandora repository - history includes large files from before larpandora project began
Something I spotted when I tried to push a clone of the larpandora repository to github: the larpandora repository does not appear to have started with a clean "git init" at the point at which the larpandora project was first created. Instead, there seems to be history going back for several years, so it looks like an existing repository must have been re-used. This is obviously not ideal, but the main issue is that the first commits consist of accidentally adding, then removing some large files. In particular there is one file, "gxspl-MINOS.xml", which is 112MB and it is this file that prevents pushing a clone to github (would need to ask to enable large file support, etc.). Presumably this single file dominates the size of the repository.
Rewriting repository history is always a sensitive issue, so I'm not suggesting or asking for anything here; just trying to open up a dialogue. In principle, it would be possible to find the "proper" start of the larpandora project and erase history before that point. Less aggressive would be to erase the single, largest file from the repository history. I have used something along the following lines to wipe gxspl-MINOS.xml from history before pushing to github. Of course this means that, next time I try to do a fetch and merge from Redmine, I need to address the inconsistent histories, which clearly becomes fiddly.
git filter-branch --prune-empty --index-filter "git rm --cached -f --ignore-unmatch gxspl-MINOS.xml" --tag-name-filter cat -- --all
Suggestions and comments most welcome - thanks!
#3 Updated by Lynn Garren about 4 years ago
After looking further at the log files, it appears that we saved the history for the entire larsoft-svn repository instead of just the directories that went into larpandora when we migrated the code from svn to git. This was unintentional. We will prune the history, but are still sorting out details.