git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Next: David A. Greene
Message 1 of 3 in “Subtree split unsquashes everything”
  1. Joseph MusserMay 14, 2016
  2. David A. GreeneMay 21, 2016
  3. Joseph MusserMay 22, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.