Git development
 help / color / mirror / Atom feed
* Moving commits from one branch to another (improving my git fu!)
@ 2013-10-22  5:38 Mandeep Sandhu
  2013-10-22  5:52 ` Peter Krefting
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mandeep Sandhu @ 2013-10-22  5:38 UTC (permalink / raw)
  To: git

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'.

$ git branch
* topicA
* stable
* dev

topicA was based on stable. But now I want to base it dev.

So I did what was most suggested, i.e use 'git rebase --onto'.

Here's what I did when I was in topicA:

$ git rebase dev stable topicA
(this was suggested in the manpage as well).

This started off a massive rebase operation, because the 'dev' branch
is vastly diverged from stable, and a lot of conflicts started
appearing.

I'm not sure if I'm doing it right here, so can anyone suggest whether
this is right or do I need to do it differently?

PS: Please CC me (mandeepsandhu.chd@gmail.com) in your reply as I'm
not currently subscribed to the list.

Thanks for your time.

Regards,
-mandeep

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-10-22 13:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22  5:38 Moving commits from one branch to another (improving my git fu!) Mandeep Sandhu
2013-10-22  5:52 ` Peter Krefting
2013-10-22  6:11   ` Mandeep Sandhu
2013-10-22  6:00 ` Bryan Turner
2013-10-22  6:15   ` Mandeep Sandhu
2013-10-22 12:42 ` Noufal Ibrahim
2013-10-22 12:51   ` Mandeep Sandhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox