1

My current git history looks like this:

develop: A -- B -- C \ feature1: D -- E \ feature2: G -- H -- I 

But, I would prefer this, instead:

feature2: G' -- H' -- I' / develop: A -- B -- C \ feature1: D -- E 

Can someone help me with such a rebase, as well as explain the rebase command used for me, if possible?

1 Answer 1

3

OK. Read the manual, and found this:

git rebase --onto develop feature1 feature2 
Sign up to request clarification or add additional context in comments.

2 Comments

As a strategy, I normally try to build every new feature as a fork of master (or develop in your case). It gives me the flexibility to merge and release features in any order, in any combination, and rebase them onto each other as necessary without necessarily affecting any of the others.
Yeah, I prefer exactly the same. Just that in this case, I branched off another feature accidentally. Hence, I was trying to rebase it so that it seems to be a branch of develop.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.