I have a dotfiles repository. I want to merge another one with submodules (prezto) into it, so I can conveniently have everything in one repository without the inconvenience of submodules.
How can I subtree merge prezto into my dotfiles repository with all its submodules?
I can use submodules, I can split and merge subtrees either the "old fashioned" way or with the newer git subtree tool.
I just don't know how to do this specific case.
Alexander Mikhailian created a script to convert all the submodules in subtrees, you should be able to adapt it to your case.
Presenting here the steps:
I think the easiest route for you would be to apply the script on the
preztorepo and then make the repo a subtree in thedotfilesrepository.After executing the script in the
preztorepository you will use the following steps to create the subtree:Add a new remote URL pointing to the
preztorepo into thedotfiles.Merge the
preztoproject into the localdotfilesproject. This doesn't change any of your files locally, but it does prepare Git for the next step.Create a new directory called
prezto-subdir(or whatever you like), and copy the Git history of thepreztoproject into it.Commit the changes to keep them safe.