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

how to delete the entire history before a certain commit

From
GGelonida <gelonida@gmail.com>
Date
May 3, 2010, 22:23 UTC
Message-ID
<hrnidr$etm$1@dough.gmane.org>
Hi,
I noticed, that this post never arrived :-( . So here again.

We have a git repository, whose size we want to reduce drastically due to frequent clone operations and a slow network connection.

The idea is following:
* archive the git repository just in case we really have to go back in
history.
create a new git repository, which shall only contain last month's activity.

all changes before should be squashed together. It would be no problem if the very first commit remains unmodified.

I made some attempts with git rebase -i

but I always encounter errors. Example error is a cherry pick which can't be applied.

Is git rebase the correct way to delete en entire history section or are there smarter ways to do this? (e.g. create a new repository with last months state as starting point and some 'magic' to replay from this point on with all branches and merges_

thanks for any suggestion.
Next: Jakub Narebski
Message 1 of 5 in “how to delete the entire history before a certain commit”
  1. GelonidaMay 3, 2010
  2. Jakub NarebskiMay 3, 2010
  3. GelonidaMay 3, 2010
  4. Jakub NarebskiMay 3, 2010
  5. GelonidaMay 3, 2010

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.