{"thread":{"id":"26785","subject":"Question: How to rebase my changes on a new base (ref)?","startedAt":"2011-03-19T08:50:37Z","lastAt":"2011-03-19T08:54:18Z","messageCount":2,"participants":["Ilyes Gouta"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"163730","messageId":"AANLkTinnGw-u-snLwTUzry2PRmTUD7oDGjedJLhkJGoh@mail.gmail.com","threadId":"26785","inReplyTo":null,"subject":"Question: How to rebase my changes on a new base (ref)?","fromName":"Ilyes Gouta","fromEmail":"ilyes.gouta@gmail.com","sentAt":"2011-03-19T08:50:37Z","receivedAt":"2011-03-19T08:50:37Z","isPatch":false,"sender":{"key":"ilyes.gouta@gmail.com","avatar":null},"body":"Hi,\n\nI've been tracking a project, via the master branch, customizing\ncertain aspects and applying my changes into a separate local branch\nB. In the mean time, there is this new remote branch\norigin/release_2.1, that was created for releasing a certain version.\nIt happened that I merge entirely that master branch into my local\nbranch, periodically, in order to get the latest change sets. It also\nhappens in that projects, that commits from branch C get merged into\nthe project's origin/master.\n\nI'd like to do the following: Take all the those changes I made\nagainst origin/master, checkout a local branch based on\norigin/release_2.1 and apply them on it. This way I can get my\ncustomizations re-based against that particular branch (stream)\ninstead of origin/master being the parent/upstream.\n\nIs it possible to achieve that? does it involves a kind of git\nrebasing (--onto ?). So far, I used exclusively a merge flow to\nmaintain my private branch B in sync with origin/master and that right\nnow that code base is more recent than origin/release_2.1.\n\nHere is the structure, in ASCII, of the project: (best viewed with a\nproportional font)\n\norigin/master\n|\n|\n|  |  |\n|  |  |\n|  |  |\n+--|--\\ (sometimes commits in origin/release_2.1 go into origin/master)\n|  |  |\n|  |  |\n|  |  |\n|  |  |\n|  |  |\n|  +  | (git merge origin/master into my_private_branch)\n| /|  |\n+  |  |\n|  |  |\n|  |  |\n|  +  | (git merge origin/master into my_private_branch)\n| /|  |\n+  |  |\n|  |  | origin/release_2.1\n|  |  /\n+--|-/\n|  |\n|  | my_private_branch (git checkout -b)\n|  /\n+/\n|\n|\n\nRegards,\n\n-Ilyes\n"},{"id":"163732","messageId":"AANLkTi=8hbaMZDhrdC1pppk5OBejTuaMSpG4BCr_TpGs@mail.gmail.com","threadId":"26785","inReplyTo":"AANLkTinnGw-u-snLwTUzry2PRmTUD7oDGjedJLhkJGoh@mail.gmail.com","subject":"Re: Question: How to rebase my changes on a new base (ref)?","fromName":"Ilyes Gouta","fromEmail":"ilyes.gouta@gmail.com","sentAt":"2011-03-19T08:54:18Z","receivedAt":"2011-03-19T08:54:18Z","isPatch":false,"sender":{"key":"ilyes.gouta@gmail.com","avatar":null},"body":"Please CC me in the reply. I'm not registered to the mailing-list. Thanks!\n\n-Ilyes\n\nOn Sat, Mar 19, 2011 at 9:50 AM, Ilyes Gouta <ilyes.gouta@gmail.com> wrote:\n> Hi,\n>\n> I've been tracking a project, via the master branch, customizing\n> certain aspects and applying my changes into a separate local branch\n> B. In the mean time, there is this new remote branch\n> origin/release_2.1, that was created for releasing a certain version.\n> It happened that I merge entirely that master branch into my local\n> branch, periodically, in order to get the latest change sets. It also\n> happens in that projects, that commits from branch C get merged into\n> the project's origin/master.\n>\n> I'd like to do the following: Take all the those changes I made\n> against origin/master, checkout a local branch based on\n> origin/release_2.1 and apply them on it. This way I can get my\n> customizations re-based against that particular branch (stream)\n> instead of origin/master being the parent/upstream.\n>\n> Is it possible to achieve that? does it involves a kind of git\n> rebasing (--onto ?). So far, I used exclusively a merge flow to\n> maintain my private branch B in sync with origin/master and that right\n> now that code base is more recent than origin/release_2.1.\n>\n> Here is the structure, in ASCII, of the project: (best viewed with a\n> proportional font)\n>\n> origin/master\n> |\n> |\n> |  |  |\n> |  |  |\n> |  |  |\n> +--|--\\ (sometimes commits in origin/release_2.1 go into origin/master)\n> |  |  |\n> |  |  |\n> |  |  |\n> |  |  |\n> |  |  |\n> |  +  | (git merge origin/master into my_private_branch)\n> | /|  |\n> +  |  |\n> |  |  |\n> |  |  |\n> |  +  | (git merge origin/master into my_private_branch)\n> | /|  |\n> +  |  |\n> |  |  | origin/release_2.1\n> |  |  /\n> +--|-/\n> |  |\n> |  | my_private_branch (git checkout -b)\n> |  /\n> +/\n> |\n> |\n>\n> Regards,\n>\n> -Ilyes\n>\n"}]}