[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Switching from old git tree

From: David Kastrup
Subject: Re: Switching from old git tree
Date: Fri, 14 Nov 2014 15:54:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Sven Axelsson <address@hidden> writes:

> On 14 November 2014 14:53, David Kastrup <address@hidden> wrote:
>> Sven Axelsson <address@hidden> writes:
>>> I suppose you could add your old repo as a local remote to the new one, and
>>> cherry-pick your commits, i.e.:
>>> git remote add old /local/path/to/old
>>> # Fetch the data to your new repo
>>> git fetch old
>>> # Find the commits to pick somehow
>>> git log old/master
>>> # Copy to new repo
>>> git cherry-pick <sha-of-commit>
>> Well, I was trying to avoid the "double your repository size or no money
>> back" effect.  While the file and tree blobs in two differently
>> converted Emacs repositories are presumably pretty much the same, the
>> entire commit history is disjoint.  Once it takes root in your
>> repository, it will take a long long time before it gets washed out
>> again _after_ removing all branches/references to it.  Going through
>> patches minimizes the data the new repository gets to see from the old
>> one.
> Sure, but does the repo size really matter? We are not talking about data
> that is transmitted upstream.
> Also, isn't it sufficient to do
> git remote rm old
> git gc
> to clean out the repo?

If you did not forget any reference (like old bisect labels) this recipe
should work fine once you add an additional second step.  That
additional second step is "wait for more than three months" with the
default settings.

Git is really good at not terminally losing information even when you
mess up completely.  Passing a branch through a repository basically
imprints a backup on the repository that will take quite some time to
get removed again.  Often that is what you want.  When you know in
advance that you don't, it may make sense to make sure only the data you
want gets in.

David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]