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

Issue with subtree split in git version post 2.7.X on MAC

From
SPShrikant Prasad <sprasad@zimbra.com>
Date
Jun 16, 2016, 07:26 UTC
Message-ID
<1421824581.98623.1466062014054.JavaMail.zimbra@zimbra.com>
Hi,
I am trying to extract part of larger git repo to create a new smaller repo maintaining al the history of the extracted portion. For this I used git subtree split command.
Following are the steps followed: 
1. git clone of full repo in 'full_rep' dir
2. Initialised new empty target repo: 
    mkdir new_repo
     cd new_repo
     git init
3. split the desired subtree into a new branch:
    cd ../full_repo
    git subtree split --prefix='folder_name_to_be_extracted' --annotate="(split)" -b new-repo
4. pull the new branch into the new empty repo: 
    cd ../new_repo
    git pull ../full_repo new-repo:master
5. check size of the new repo : du -sh .
With git version 2.8.4 on Mac EL Capitan OS, size of repo is coming out to be 117M and also the history of new repo is not specific to the extracted portion only. Its containing commits from different folders too.
Whereas with git version 2.5.5, size of repo comes tout to be 9.5M and history of new repo is correct, containing only extracted portion commits history.
Please check if there is some issue with git version 2.8.4 on mac while running subtree split.

Regards, Shrikant Prasad

Message 1 of 1 in “Issue with subtree split in git version post 2.7.X on MAC”
  1. Shrikant PrasadJun 16, 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.