Git development
 help / color / mirror / Atom feed
From: Peter Krefting <peter@softwolves.pp.se>
To: Git Mailing List <git@vger.kernel.org>
Subject: How to rebase and rename?
Date: Wed, 3 Feb 2010 10:05:10 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.00.1002030958380.17444@ds9.cixit.se> (raw)

Hi!

If I have a repository with a topic branch that is published, and that I 
want to rebase and republish under a new name, is there an easy way of doing 
that?

I.e., I want to go from

      ---C---D topic-1
     /
  --A---X---X---B master

to

        ---C---D topic-1
 	  /
      /           ---C'---D' topic-2
     /           /
  --A---X---X---B master

Currently, I do something along the lines of:

  git branch topic-2 topic-1
  git rebase master topic-2

but that feels wrong as it creates the "topic-2" branch pointing the 
the wrong way first. Is there a way to eliminate that step?

-- 
\\// Peter - http://www.softwolves.pp.se/

             reply	other threads:[~2010-02-03  9:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03  9:05 Peter Krefting [this message]
2010-02-03  9:48 ` How to rebase and rename? Jeff King

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=alpine.DEB.2.00.1002030958380.17444@ds9.cixit.se \
    --to=peter@softwolves.pp.se \
    --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