Benjol Benjol - 1 year ago 98
Git Question

Point branch to new commit

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

Answer Source


git checkout master
git merge C

With C being the SHA1 of commit C.


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

It should be a fast-forward merge.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download