Reorganising git commits into different branches

Posted by user1425706 on Stack Overflow See other posts from Stack Overflow or by user1425706
Published on 2014-06-03T03:22:52Z Indexed on 2014/06/03 3:24 UTC
Read the original article Hit count: 87

Filed under:
|

I am trying to reorganise my git tree so that it is structured a bit better. Basically at the moment I have a single master branch with a couple of small feature branches that split from it. I want to go back and reorder it so that the only commits in the main branch are the ones corresponding to new version numbers and then have all the in between commits reside in a separate develop branch from which the feature branches split from too. Basically I'm looking for a tool that will let me completely manually reorganise the tree. I thought maybe that interactive rebasing was what I was looking for but trying to do so in sourcetree makes it seem like it is not the right tool.

Can anyone give me some advice on how best to proceed. Below is a diagram of my current structure:

featureA x-x-x
/ \ master A-x-x-x-x-B-x-x-x-C D

Desired structure:

feature x-x-x / | develop x-x-x-x-x-x-x - / | | | master A - B - C - D

© Stack Overflow or respective owner

Related posts about git

Related posts about rebase