1

This is not the same as Split a git branch into two branches? and not How to move certain commits to another branch in git?

I have linear B---C history branched from Master:

Master ---A
           \
      Foo   B---C

I want to move C to a separate branch based on B:

Master ---A
           \
      Foo   B
             \
        Bar   C

How can I do this?

1 Answer 1

3

Simply:

That is:

git checkout -b Bar C
git branch -f Foo B

Not the answer you're looking for? Browse other questions tagged or ask your own question.