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

Questions about git-push for huge repositories

From
LDLevin Du <zslevin@gmail.com>
Date
Sep 6, 2015, 08:16 UTC
Message-ID
<CAN6cQGPcGpaXUGu_7aaeJtMbruMocte-5po97vG5r39f=YdTZQ@mail.gmail.com>
Hi all,
I meet with a strange problem:
I've two repositories, with sizes:
  - A:  6.1G
  - B:  6G
Both A & B have been 'git gc' with:
  git reflog expire --expire=now --all
  git gc --prune=now --aggressive
Since A & B share many common files, to save disk space, I'd like to merge them:
(note: branch of A & B are independent, i.e. have no common ancestor.)
   git clone --bare A  C
   (cd B; git push ../C master:master_b)
Repo C's size has grown to 12G. Doing a 'git gc' again, it drops to 6.2G.

I expect that 'git push' push only new files and commits, which will save lots of space. Yet it turns out I'm wrong. Since Repo A has been published, pushing branch of B will double the repo size, which is impossible for the storage limit.

Any suggestions? Thanks in advance.

Best Regards, Levin Du

Next: Junio C Hamano
Message 1 of 9 in “Questions about git-push for huge repositories”
  1. Levin DuSep 6, 2015
  2. Junio C HamanoSep 6, 2015
  3. Levin DuSep 7, 2015
  4. Levin DuSep 7, 2015
  5. Levin DuSep 8, 2015
  6. Jeff KingSep 8, 2015
  7. Junio C HamanoSep 8, 2015
  8. Jeff KingSep 8, 2015
  9. Jeff KingSep 8, 2015

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.