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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html