Saturday, 17 August 2013

Move past commits to their own branch

Move past commits to their own branch

I have a git repo that looks kinda like this:
A - B - C - D - E - F
^ ^
| |
Staging master
I want to move the Staging branch pointer to E, but I don't want commits B
and D to be in the branch. I want to put B and D into their own branch.
Staging
|
V
A ---- C ----- E - F <- master
\ /
B ----- D -----
^
|
new branch
I have no idea how to move the commits out of the master branch chain and
move them to their own branch, and then re-merge them into master again.
Is this even possible?

No comments:

Post a Comment