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

Re: collapsing old git history to reduce repo size, while preserving commit #s and tags

From
SCStas Cherkassky <scherkas@gmail.com>
Date
Oct 29, 2013, 22:42 UTC
Message-ID
<CAJSXqrqz3KeiPKWz6rFKb4o0F88o9=63Sv37MJSp5qmYtod-6A@mail.gmail.com>
In-Reply-To
<CAJSXqrr4nA6azBgaD7rBbYSLWonQkn7PvSsPTXjAPaxW6E+LiA@mail.gmail.com>
Hi,

I have an old git repo with e.g. 1000 commits, that grew up to considerable size. Now, I am starting a new project and want to use this repo, but "slimmed down".

I'd like to clone the repo to the new project and "slim it down" I'd like to collapse 900 first commits into one, but keep last 100, with their commit numbers and tags. I also want to be able to push and merge changes from the old repo to the new one.

I've read about git rebase, but it seems to tamper with commit numbers and looses tags.. Is there any other way to have it done ?

thanks!!
Next: Andrew Ardill
Message 1 of 5 in “Re: collapsing old git history to reduce repo size, while preserving commit #s and tags”
  1. Stas CherkasskyOct 29, 2013
  2. Andrew ArdillOct 29, 2013
  3. Stas CherkasskyOct 30, 2013
  4. Jakub NarębskiOct 30, 2013
  5. Duy NguyenOct 30, 2013

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.