0xAX
0xAX

Reputation: 21817

Remove commits between commits

I have 3 branches:

master state is:

          HEAD
           |
           |
 A -- B -- C

test1 state:

                    HEAD
                     |
                     |
 A -- B -- C -- D -- E

And test2 state:

                              HEAD
                               |
                               |
 A -- B -- C -- D -- E -- F -- G

Now i need to rebase test2 branch that base for it will be master, as:

                    HEAD
                     |
                     |
 A -- B -- C -- F -- G

How to do it correctly?

Thank you.

Upvotes: 0

Views: 122

Answers (2)

Adnan Aftab
Adnan Aftab

Reputation: 14477

You can see all commit by git log... then you can checkout specific commit and can play around with that. see this How to revert Git repository to a previous commit? I hope you will find you answer here.

Upvotes: 1

abyss.7
abyss.7

Reputation: 14452

git rebase --onto master test1 test2

Upvotes: 3

Related Questions