git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ilyes Gouta <ilyes.gouta@gmail.com>
To: git@vger.kernel.org
Subject: Question: How to rebase my changes on a new base (ref)?
Date: Sat, 19 Mar 2011 09:50:37 +0100	[thread overview]
Message-ID: <AANLkTinnGw-u-snLwTUzry2PRmTUD7oDGjedJLhkJGoh@mail.gmail.com> (raw)

Hi,

I've been tracking a project, via the master branch, customizing
certain aspects and applying my changes into a separate local branch
B. In the mean time, there is this new remote branch
origin/release_2.1, that was created for releasing a certain version.
It happened that I merge entirely that master branch into my local
branch, periodically, in order to get the latest change sets. It also
happens in that projects, that commits from branch C get merged into
the project's origin/master.

I'd like to do the following: Take all the those changes I made
against origin/master, checkout a local branch based on
origin/release_2.1 and apply them on it. This way I can get my
customizations re-based against that particular branch (stream)
instead of origin/master being the parent/upstream.

Is it possible to achieve that? does it involves a kind of git
rebasing (--onto ?). So far, I used exclusively a merge flow to
maintain my private branch B in sync with origin/master and that right
now that code base is more recent than origin/release_2.1.

Here is the structure, in ASCII, of the project: (best viewed with a
proportional font)

origin/master
|
|
|  |  |
|  |  |
|  |  |
+--|--\ (sometimes commits in origin/release_2.1 go into origin/master)
|  |  |
|  |  |
|  |  |
|  |  |
|  |  |
|  +  | (git merge origin/master into my_private_branch)
| /|  |
+  |  |
|  |  |
|  |  |
|  +  | (git merge origin/master into my_private_branch)
| /|  |
+  |  |
|  |  | origin/release_2.1
|  |  /
+--|-/
|  |
|  | my_private_branch (git checkout -b)
|  /
+/
|
|

Regards,

-Ilyes

             reply	other threads:[~2011-03-19  8:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-19  8:50 Ilyes Gouta [this message]
2011-03-19  8:54 ` Question: How to rebase my changes on a new base (ref)? Ilyes Gouta

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=AANLkTinnGw-u-snLwTUzry2PRmTUD7oDGjedJLhkJGoh@mail.gmail.com \
    --to=ilyes.gouta@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).