Re: Moving commits from one branch to another (improving my git fu!)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for the link.

I too tried doing a rebase with --onto, though as I said, I was
getting a lot of conflicts while doing it.

So cherry-picking my 2 commits was the solution that worked. I had
also screwed up my topic branch by doing different combo's of this cmd
and using --set-upstream-to option to point to 'dev' on a branch that
was branched off from 'stable'! :)

Lesson learned. I'll be careful when doing branching next time :)

-mandeep



On Tue, Oct 22, 2013 at 6:12 PM, Noufal Ibrahim <noufal@xxxxxxxxxxxxxxx> wrote:
> Mandeep Sandhu <mandeepsandhu.chd@xxxxxxxxx> writes:
>
>> Hi All,
>>
>> I'm in a bit of a pickle! :) So I've come to ask for help from the guru's here.
>>
>> My story is not unique but somehow the various suggested solutions
>> don't seem to work in my case.
>>
>> * I was working on a feature which was supposed to be done off our
>> 'dev' branch. But instead I forgot and branched out my topic branch
>> from master (or as we call it 'stable').
>> * I did 2 commits and finished off my work. Only later realizing that
>> it had to be done off 'dev'.
>> * Now I want to move my 2 commits (which are the top 2 commits on my
>> topic branch) to a new branch which is branched off 'dev'.
>
> I had a situtation similar to this a while ago and used the --onto
> option to rebase. The details are at
> http://nibrahim.net.in/2012/01/09/moving_topic_branches_in_git.html
>
> [...]
>
>
> --
> Cordially,
> Noufal
> http://nibrahim.net.in
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]