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?

Community
  • 1
  • 1
Oleg
  • 9,341
  • 2
  • 43
  • 58

1 Answers1

3

Simply:

That is:

git checkout -b Bar C
git branch -f Foo B
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250