git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git repository size vs. subversion repository size

From
JHJan Hudec <bulb@ucw.cz>
Date
Apr 13, 2008, 09:57 UTC
Message-ID
<20080413095708.GA16649@efreet.light.src>
In-Reply-To
<20080405023437.GA8861@atjola.homenet>
On Sat, Apr 05, 2008 at 04:34:37 +0200, Björn Steinbrink wrote:
Show 39 quoted lines
> On 2008.04.04 22:27:12 -0400, Sean Brown wrote:
> > On Fri, Apr 4, 2008 at 6:17 PM, Björn Steinbrink <B.Steinbrink@gmx.de> wrote:
> > > On 2008.04.04 18:02:56 -0400, Sean Brown wrote:
> > >  > Last night I decided to see what storage size differences I might see
> > >  > between an svn repo and a git one.  So I imported a highly used
> > >  > subversion repository into git and was shocked to see how huge the git
> > >  > version was.  I used a repo that has a lot of branches and tagged
> > >  > releases just to make sure importing into git would in fact keep all
> > >  > of the history.  It did keep the history, but the total disk usage was
> > >  > very different:
> > >  >
> > >  > $subversionbox # du -hs ./my_sample_website/
> > >  > 67M   ./my_sample_website
> > >  >
> > >  > $localhost # du -hs ./git-samplesite/
> > >  > 3.6GB ./git-samplesite/
> > >
> > >  How much of that is in the .git/svn directory? The contents of that
> > >  directory are used to map git commits to svn revision and git versions
> > >  before 1.5.4 had a quite space consuming file format for that. The new
> > >  format is a lot better. If you want to switch completely, you can even
> > >  just delete the .git/svn directory, as that's only required as long as
> > >  you want to interact with the corresponding svn repository.
> > >
> > >  And finally, you might want to repack to repository once after the
> > >  initial import, to get a smaller repo. Something like:
> > >  git repack -a -d -f --window=100 --depth=100
> > >
> > 
> > The svn folder (in the.git directory) was only about 4.2 MB.  After
> > running the repack (and then after that git gc as mentioned by another
> > in this thread), it's still about 3.5 GB.
> > 
> > git-samplesite (master)]$ du -hs ./*
> > 2.1G	./branches
> > 1.4G	./tags
> >  66M	./trunk
> 
> Uhm, you forgot to use -s when doing the clone. That would have created
No, not the clone, but the git svn init.
Show 10 quoted lines
> real git branches instead of the directories... What you are counting is
> the size of the checked out, uncompressed files of _all_ branches and
> _all_ tags (and trunk). The repo size of basically what "du -sh .git"
> would give.
> 
> Björn
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: Björn SteinbrinkNext: Shawn O. Pearce
Message 10 of 11 in “git repository size vs. subversion repository size”
  1. Sean BrownApr 4, 2008
  2. Björn SteinbrinkApr 4, 2008
  3. Stephen BannaschApr 4, 2008
  4. Steven WalterApr 5, 2008
  5. Stephen BannaschApr 5, 2008
  6. Björn SteinbrinkApr 5, 2008
  7. Eric HanchrowApr 14, 2008
  8. Sean BrownApr 5, 2008
  9. Björn SteinbrinkApr 5, 2008
  10. Jan HudecApr 13, 2008
  11. Shawn O. PearceApr 5, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.