Is there any way I can test how the deletion of several branches will affect the size of that git repo. I have a git repo with 10 lived branches and hundreds of feature (short lived branches).
The repo is very large and slow to clone. GitLab shows 1.4 GB as the total size, git-sizer shows a blob total size of 8.4 GB.
I have tried tools such as BFG Repo Cleaner to remove unwanted history, but I've only managed a reduction of 1.4 to 1 GB which is not really sufficient.
My strategy split my repo in 2 and also to use multiple forks to separate streams of work. I will also add push extension and size restriction in GitLab to stop pushing of junk. We've had problems with .rar, .zip, .jar files, personal backups mistakenly pushed etc. However I also want to know if I can retain the history of my long lived branches. So my questions:
- Is it possible to see how much the size would be reduced if I deleted all the short lived branches?
- Can this be achieved locally?
- Or do I just have to duplicate everything to a test repo on GitLab and delete the branches on this test repo?