git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Howard Miller <howard@e-learndesign.co.uk>
Cc: git@vger.kernel.org
Subject: Re: Created branch in wrong place... how to fix?
Date: Wed, 01 Jun 2011 06:32:24 -0700 (PDT)	[thread overview]
Message-ID: <m362opy8xz.fsf@localhost.localdomain> (raw)
In-Reply-To: <BANLkTingMK3Zv6NZdFAiLXZzJpSZYZmjQA@mail.gmail.com>

Howard Miller <howard@e-learndesign.co.uk> writes:

> I created a branch in a project and did a series of commits. I now
> discover that I really wanted to make all those changes against a
> completely different branch of the same project. There shouldn't be
> any issues as the branch introduces entirely new files (no changes to
> existing code).
>
> I'm struggling to see a way to do this without loosing the history.
> Some Google'ing suggests 'rebase --onto' but I'm struggling to see how
> this works or if it is appropriate. Any pointers much appreciated :)
> Thanks.

This is decidely work for git rebase:

  $ git rebase --onto <where it should be based> <where it is based> <branch>

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  parent reply	other threads:[~2011-06-01 13:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 12:47 Created branch in wrong place... how to fix? Howard Miller
2011-06-01 12:52 ` Tim Guirgies
2011-06-01 13:32 ` Jakub Narebski [this message]
     [not found]   ` <BANLkTiktYkvGqc9Wq51-QMKe2kHzcmGXRQ@mail.gmail.com>
2011-06-02  6:28     ` Jakub Narebski

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=m362opy8xz.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=howard@e-learndesign.co.uk \
    /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).