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

Re: how to reduce disk usage for large .git dirs?

From
Olaf Hering <olaf@aepfle.de>
Date
Nov 13, 2014, 12:03 UTC
Message-ID
<20141113120313.GB15503@aepfle.de>
In-Reply-To
<20141113114919.GA2737@paksenarrion.iveqy.com>
On Thu, Nov 13, Fredrik Gustafsson wrote:
Show 7 quoted lines
> On Thu, Nov 13, 2014 at 12:14:44PM +0100, Olaf Hering wrote:
> > 
> > How can I reduce the disk usage for multiple copies of the same repo?
> 
> You can use --local och --shared. As you say --shared can be dangerous.
> If you don't understand the man page enough to know how you should
> manage your clones you should probably not use it.
Perhaps its more a lack of doc how to use the result.
> --local seems to be what you're looking for.
I will try this.
> However as a side note I'm curious about what your use case is. Why do
> you need this many repos?

Because I do work in each copy, poke around, or do commits and push them.

Show 5 quoted lines
> Your setup looks familiar to me for a subversion user switching to git
> and trying to use git as subversion. The common usecase is not to have
> multiple worktrees but to do a checkout to the worktree you need to work
> on. This is possible with git since it's very fast and I recommend you
> to try to use one worktree.
Switching branches will invalidate timestamps, causing a full rebuild.
Olaf
Previous: Fredrik GustafssonNext: Jakub Narębski
Message 3 of 18 in “how to reduce disk usage for large .git dirs?”
  1. Olaf HeringNov 13, 2014
  2. Fredrik GustafssonNov 13, 2014
  3. Olaf HeringNov 13, 2014
  4. Jakub NarębskiNov 14, 2014
  5. Roger GammansNov 13, 2014
  6. Olaf HeringNov 13, 2014
  7. Duy NguyenNov 13, 2014
  8. Olaf HeringNov 13, 2014
  9. Fredrik GustafssonNov 13, 2014
  10. Johan HerlandNov 13, 2014
  11. Jeff KingNov 13, 2014
  12. Olaf HeringNov 14, 2014
  13. Fredrik GustafssonNov 14, 2014
  14. Olaf HeringNov 14, 2014
  15. Olaf HeringNov 14, 2014
  16. Olaf HeringNov 14, 2014
  17. Andreas SchwabNov 14, 2014
  18. Olaf HeringNov 25, 2014

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.