We’ve been using Subversion and are considering moving to git. So I am very much a git illiterate. I used git svn clone to copy the svn history to git and my git folder was 3.1G. I followed some advice from several blogs to shrink it and ran:
git repack -a d -f --window=100
It processed 494,755 objects successfully but when I look at the disk size now it is using 3.7G. So what I thought would shrink it made it significantly larger. I tried running it again with
git repack -a d -f --window=250 --depth=250
but no changes to the size. The git prune command also didn’t appear to do anything. It took several days to clone this, so I would rather not start over.
Is there any way to go back to the smaller size, or any ideas anyone has on why repack made it bigger?
We’ve been using Subversion and are considering moving to git. So I am very
Share
git-svnis a good way if you have to copy a repo from SVN to git, but honestly, it is better to work natively in git. That said, I’ve used this before and this is the best guide I found on the matter.Really, you may want to play around with the revision history you are importing by using the
-roption. Also I did an:to remove all the .svn folders. I don’t plan on commiting from git to svn, so that was good for me, but if you plan to use git locally and commit to your SVN repo, then you’ll have to do a little more research on the best way to do that.
Also
git-gchelps to compress objects. See if that helps reduce the size of your repo.Git is great so I hope you find you like it and switch over.