A classic case of "don't start from here"... as is the way of all things, disorganisation has descended on our Git, tree looks something like this:
A-B-C-D master
\
E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T... exciting new stuff
Whereas the unfortunate truth that it would be better reflected something like this:
P-Q failed idea
/
A-B-C-D K-L-M-N-O U-V... master
\ / \ /
\ / R-S-T oh god fix it fix it arghh
\ /
E-F-G-H-I-J exciting new stuff
For ease of annotation, let's use numbers:
P-Q Branch 2
/
A-B-C-D K-L-M-N-O U-V... master
\ / \ /
\ / R-S-T Branch 3
\ /
E-F-G-H-I-J Branch 1
Closest thing I've found is this question:
How do I move recent (but not latest) commits to a new branch
But I'm not clear enough on what the top answer actually ends up doing to make me want to try it and see.
If it helps, the project is small and not being actively worked on by multiple people, so assume that we can get away with naughty behaviour like "changing history". It's all living on a github server if that makes a difference, so we want to end up with the changes reflected on that server not just locally.
EDIT:
OK I'll try and be a bit clearer on what I'd like to do.
I really should have said: PQ was a dead-end development that was effectively rolled-back by , so handle that as you feel is best! This project has suffered chaos panic and disorder worthy of an entire volume of Dilbert strips and consequently the Git tree and my own mental sanity have suffered significantly.
Starting point the current tree looks like this:
A-B-C-D master
\
E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T... exciting new stuff
Step 1 I'd like to end up with this:
A-B-C-D K-L-M-N-O-P-Q-R-S-T... master
\ /
E-F-G-H-I-J Branch 1
Step 2 I'd then like to do this:
P-Q Branch 2
/
A-B-C-D K-L-M-N-O-R-S-T... master
\ /
E-F-G-H-I-J Branch 1
I think if I can get those done without snapping the universe in half I'll be able to work the rest out from there.