0

Here's the commit graph I have:

A--B--C--D--E--F (master) 

And here's what I want:

A--B--E--F (master) \ C--D (branch1) 

from master I can create branch1, then rebase interactively from B both masterand branch1, picking the commits I want, but I think it not straghtforward. Is there a better way to do that?

1 Answer 1

4

No, rebasing is the most straigtforward way to do this. The only other way is a more manual way with git cherry-pick and git reset.

git branch branch1 master git rebase --onto B D master 

Hope this helps

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.