tags:

views:

26

answers:

1

(This question is the opposite of this one)

How can I go from this

dev            C - D
             /
master A - B 

to this?

dev                D
                 /
master A - B - C 

I know I'm going to kick myself when I see the answer, but for the moment I'm a bit stuck...

+2  A: 
git checkout master
git merge C

                 D (dev)
                /
master A - B - C (move master HEAD)

(with C being the SHA1 of comit C)

It should be a fast-forward merge.

VonC
Thanks, I was hoping you'd be around :) I'm not sure I need the `branch -f` though, I've got the required result just with the checkout/merge.
Benjol
@Benjol: not tested though. Make sure it works in your case.
VonC
@Benjol: around since September 2008 ;)
VonC
@VonC, 3 days more than me :)
Benjol
@Benjol: right I will fix the answer
VonC
@Benjol: 3 days... that is all the difference between 1 beta badge and 0 beta badge ;)
VonC