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

Re: Alioth - Convert SVN repo to Git

On Thu, Mar 26 2009, Mike Hommey wrote:

> On Thu, Mar 26, 2009 at 07:31:59AM +0100, sean finney wrote:
>> hi mike,
>> On Wed, Mar 25, 2009 at 03:29:59PM +0100, Mike Hommey wrote:
>> > You don't need to do that on initial import. You can use a grafts file
>> > to create the history you like from these 2 unrelated branches, and
>> > you can then use git filter-branch to rewrite the master branch to
>> > have the commits rewritten to use this grafted history (then you can
>> > remove the grafts file).
>> do you think you could post an example of how to do that?  i keep hearing
>> about using grafts+filter-branch for such purposes but haven't been able
>> to decipher exactly what it entails.
> The grafts file format is pretty simple:
> sha1-of-the-commit-to-graft( sha1-of-its-grafted-parent)+
> This means you can create grafted merges if you put more than one
> parent.

        You should also remember that the grafts are local to your
 repo. If you push your repo to github or git.d.o; and others pull from
 that, they will not see the grafted history.

        You do a merge -s ours, however, that merge will be visible not
 just in your repo, but also in the mirrors.

        Now, if you use filter-branch, that is another story.

The chief enemy of creativity is "good" sense Picasso
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

Reply to: