Subtree split unsquashes everything
- From
Joseph Musser <me@jnm2.com>
- Date
- May 14, 2016, 16:53 UTC
- Message-ID
- <CAKRjdd7Czj2iTKdwVCmz4x9fDNKCPZtLi=UjgHOsSPuYL_yLXg@mail.gmail.com>
Hello! I was directed to ask here; I hope I am respecting your format.
I have a repo with a subtree. I squashed every merge with the subtree remote to keep the history manageable. Now down the road after a bunch of merges, I need to split my repo’s master branch into two new branches and move the subtree from `/subdir/subdir/` to `/`. (`/subdir/subdir/user/mycode/` contains code from my repo.)
I ran `git subtree split -P=subdir/subdir/ -b newbranch` and the outcome seems to be perfect except that each squash merge has turned into a full merge, bringing along all history from the other repo. Why does it do this and how can I preserve my repo history, including only squashes from the subtree remote repo like it is today?
I initially asked at http://stackoverflow.com/q/36957809
Thank you.