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

git-clone --how-much-disk-space-will-this-cost-me? [--depth n]

From
jidanni@jidanni.org <jidanni@jidanni.org>
Date
Dec 15, 2008, 23:53 UTC
Message-ID
<878wqhxaex.fsf@jidanni.org>

The git-clone manpage should mention how to determine how much disk space will be used.

You see we beginners (who haven't learned git yet, so no patches forthcoming, thank you) are often told "Just do git-clone git://git.example.org/bla/ to get started!". Being smart, we read up on --depth 1 to limit potential disk occupation, but we still have no idea of how much disk space we will need. We cant just use HEAD(1) because this is not HTTP.

Therefore the git-clone man page, one of the main entry points for the beginner, should say how to determine how much disk space we will need for git-clone or git-clone --depth 1 etc.

And don't tell us to just figure it out from the progress messages after the download begins, and hit ^C if we don't like it.

Let's take a look at those messages while were at it, $ git-clone --depth 1 git://git.sv.gnu.org/coreutils/ Initialized empty Git repository in /usr/local/src/jidanni/coreutils/.git/ remote: Counting objects: 26240, done. remote: Compressing objects: 100% (14001/14001), done. remote: Total 26240 (delta 21577), reused 15354 (delta 12095) Receiving objects: 100% (26240/26240), 15.76 MiB | 26 KiB/s, done. Resolving deltas: 100% (21577/21577), done. $ du -sh 27M . Nope, nowhere does it directly say "You Holmes, are in for 27 Megabytes (on your piddly modem)". There obviously is math involved to figure it out... math!

Also add examples of how one first probes a remote tree one has been told about, determines what parts of it he might want, and then finally git-clones just those parts.

Also document what --depth 0 or even -1 will do.
Next: Jean-Luc Herren
Message 1 of 12 in “git-clone --how-much-disk-space-will-this-cost-me? [--depth n]”
  1. jidanni@jidanni.orgDec 15, 2008
  2. Jean-Luc HerrenDec 16, 2008
  3. jidanni@jidanni.orgDec 16, 2008
  4. Jean-Luc HerrenDec 16, 2008
  5. Nicolas PitreDec 16, 2008
  6. Shawn O. PearceDec 17, 2008
  7. Nicolas PitreDec 17, 2008
  8. Shawn O. PearceDec 17, 2008
  9. Nicolas PitreDec 17, 2008
  10. Shawn O. PearceDec 17, 2008
  11. Nicolas PitreDec 17, 2008
  12. Jeff KingDec 16, 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.