git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: Joining a fixed archive with its continuation
Date: Fri, 01 Sep 2006 16:12:04 +0200	[thread overview]
Message-ID: <ed9f3e$cvm$1@sea.gmane.org> (raw)
In-Reply-To: 44F81FE5.1040509@arces.unibo.it

Sergio Callegari wrote:

>> If you want to be able to distribute it (or synchronize it between your 
>> laptop and PC _with git!_), you can rewrite the history by either 
>> git-rebase, or by using cg-admin-rewritehist if you are using cogito.
>>
>>   
> I have tried using git-rebase (I do not have cg, at least not yet).
> However I am encountering some problems...
> 
> Everything is fine with the master branch of my continuation archive doing
> 
> git rebase fixed-master master
> 
> (where fixed-master is the master head of the recovered archive)
> This does the trick nicely. I.e. I start with
> 
> A---B---C---D    E---F---G---H---I
> 
> 
> where D is fixed-master and I is master, and I end up with
> 
> A---B---C---D---E'---F'---G'---H'---I'
> 
> plus the older tree E---...---I
> 
> However I am then in trouble with the other branches of the continuation
> archive, which I simply cannot get right...
> In fact, E...I has actually a branch, say at G, like in
> 
> E---F---G---H---I
>          \
>           --M---N
> 
> 
> And I cannot make an M'---N' based at G'... the best that I am
> succeeding in is building an
> 
> E''--F''--G''--M'--N' 
> 
> based on D.

It is where --onto parameter of git-rebase is used. It means you use
<upstream> parameter to identify main branch in the continuation archive,
<branch> parameter being the branch you want to transplant into main
archive (i.e. <upstream>..<branch> being the part you want to
transplant/rebase), and '--onto <newbase>' with <newbase> being the new
fork point.

So in the abovementioned case, try

        git rebase --onto G' I N 

and tell us if it works.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

  reply	other threads:[~2006-09-01 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-01 11:56 Joining a fixed archive with its continuation Sergio Callegari
2006-09-01 14:12 ` Jakub Narebski [this message]
2006-09-01 14:37 ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ed9f3e$cvm$1@sea.gmane.org' \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).