![]() Not bad! But still a bit too close to 1 GB for my taste. Git-filter-repo -strip-blobs-bigger-than 5M -path some-existing-dir/ -path some-deleted-dir/ -invert-pathsĪfter analysis, I determined all blobs bigger than 5 MB could be safely filtered, as well as a number of directories (both existing and deleted ones). ![]() History filtering git-filter-repo -analyze # identify filtering candidates I’ll quickly go over both steps in order to focus on an issue where the first git push after an LFS migration on a big repository may take several hours or days to complete, seemingly stuck while uploading LFS objects. below for more details.īoth methods were used to reduce the size of this specific repo. Note: if you look around, you’ll probably find mentions of BFG Repo-Cleaner. ![]() git lfs migrate for LFS migration (as recommended by the Git LFS documentation).git-filter-repo for analysis and filtering (as recommended by the Git documentation and the GitLab documentation).Migrate big blobs to Git LFS (will not count in Git objects size, since they are on external storage).Īt the time of writing, the best tools for the job are:.Filter Git history and prune undesirable objects (files committed by mistake, old objects that will never be needed again, etc.).There are two main ways to reduce repository size: ) for 700K Git objects ( git rev-list -objects -all | wc -l) on a fresh git clone -mirror. The new instance had stricter requirements, notably a max size of 1 GB, and one repo in particular was not making the cut, clocking in at 1.5 GB bare total size ( du -sh. I recently had to migrate several Git repositories from one GitLab instance to another. Not interested in explanations? Fast travel to the tl dr □
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |