-1

example like : master A --> my branch B, --> correct branch C I had to create B from C but accidentally created from A. and B branch has some of my commits as well. I want to move B to the C branch with all commits. Pls Help.

           A ----> B
             \ --> C

It should be like this:

           A
             \ --> C ----> B
SaHiL
  • 1
  • 1

1 Answers1

1

While branch B is checked out,

git rebase C

Other circumstances are described in detail at How to git rebase a branch with the onto command?

grg
  • 5,023
  • 3
  • 34
  • 50