Re: moving development branch activity to new git repo

From: Elvis Pranskevichus <el(at)prans(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Subject: Re: moving development branch activity to new git repo
Date: 2010-09-21 16:15:06
Message-ID: 201009211215.07482.el@prans.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On September 21, 2010 12:08:49 pm Kevin Grittner wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> > Basically, AIUI, you have to move the old repo aside and freshly
> > clone the new repo.
>
> I was assuming that, but it's good to have confirmation. What about
> my repo at
>
> http://git.postgresql.org/gitweb?p=users/kgrittn/postgres.git ?
>
> Can that be reset to a copy of the new repo? (Or is that not really
> beneficial?)
>
> > I haven't migrated my development trees yet, but I'm planning on
> > simply applying a diff from the old repo to a newly created branch
> > in the new repo. However, that does mean losing the private commit
> > history.
>
> Yeah, I'd really rather not lose that.
>
> > I'm not sure much can be done about that, unless you migrate each
> > commit separately, which could be painful.
>
> Perhaps. I might be able to use grep and sed to script it, though.
> Right now I think I'd be alright to just pick off commits where the
> committer was myself or Dan Ports. My bash-fu is tolerably good for
> such purposes.
>
> > Maybe some of the git gurus have better ideas, though.
>
> I'm all ears. ;-)
>
> -Kevin

Here's a quick and easy way to move dev history to a new repo:

$ cd postgresql.old
$ git checkout yourbranch

# stream your commits into a "patch mailbox"
$ git format-patch --stdout master..HEAD > patches.mbox

# switch to the new repo
$ cd ../postgresql

# create a branch if not already
$ git checkout -b yourbranch

# apply the "patch mailbox"
$ git am ../postgresql.old/patches.mbox

That should do the trick. Your dev history will be kept.

Elvis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2010-09-21 16:15:52 Re: moving development branch activity to new git repo
Previous Message Dan S 2010-09-21 16:11:50 Re: Serializable snapshot isolation error logging