From: Jakub Narębski Date: Wed, 30 Oct 2013 15:55:30 GMT Subject: Re: collapsing old git history to reduce repo size, while preserving commit #s and tags Message-ID: <52712BF2.2080409@gmail.com> In-Reply-To: On 2013-10-30 08:52, Stas Cherkassky wrote: > > Shallow clone (if that's what you meant) is not suitable because it > doesn't allow to push/pull to/from this shallow repository. Still? I think there were some work on making shallow clone to allowing push/pull to/from it. > I understand that generally git is designed to preserve the history. > But the problem is real, and probably is not unique to our project. > The fact that there ARE some ways to modify history (collapse commits, > rebase, filter-branch) made me hopeful that what I need is also > possible.. By the very nature of git, namely that the 'parent' link to previous (as in: this is based on it) commit or commits, is SHA-1 of said commit, and SHA-1 identifier of commit is based on contents including 'parent' field. Both rebase and filter-branch _rewrite_ history (i.e. make modified copy of history, and let you replace old history by new). You could try to use father or shallow clone, namely *grafts*, to 'cauterize' history, but there remains same problems as with shallow clone, perhaps with exception that git won't check things for you. -- Jakub Narębski