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

git repository size / compression

From
Nneubyr <neubyr@gmail.com>
Date
Sep 9, 2011, 02:37 UTC
Message-ID
<CALFxCvzVjC+u=RDkDCQp0QqPETsv8ROE8tY=37tmMWxmQoJOEw@mail.gmail.com>

I have a test git repository with just two files in it. One of the file in it has a set of two lines that is repeated n times. e.g.: {{{ $ for i in {1..5}; do cat ./lexico.txt >> lexico1.txt && cat ./lexico.txt >> lexico1.txt && mv ./lexico1.txt ./lexico.txt; done }}}

I ran above command few times and performed commit after each run. Now disk usage of this repository directory is mentioned below. The 419M is working directory size and 2.7M is git repository/database size.

{{{ $ du -h -d 1 . 2.7M ./.git 419M .

}}}

Is it because of the compression performed by git before storing data (or before sending commit)??

Following were results with subversion:

Subversion client (redundant(?) copy exists in .svn/text-base/ directory, hence double size in client): {{{ $ du -h -d 1 416M ./.svn 832M . }}}

Subversion repo/server:
{{{
$ du -h -d 1
 12K    ./conf
1.2M    ./db
 36K    ./hooks
8.0K    ./locks
1.2M    .
}}}

-- neuby.r

Next: Carlos Martín Nieto
Message 1 of 10 in “git repository size / compression”
  1. neubyrSep 9, 2011
  2. Carlos Martín NietoSep 9, 2011
  3. neubyrSep 9, 2011
  4. Sverre RabbelierSep 9, 2011
  5. Carlos Martín NietoSep 9, 2011
  6. neubyrSep 9, 2011
  7. Jakub NarebskiSep 9, 2011
  8. neubyrSep 9, 2011
  9. John SzakmeisterSep 9, 2011
  10. Andreas KreySep 9, 2011

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.