I have a main repository with two subtrees in the "external/" folder.
When I clone the repository, it downloads all the files, including the code that I previously pushed after the Git subtree command.
I want to clone that main repository on another machine and recreate the subtree structure, but the Git subtree add command fails because the folder where I want to put the subtree in already contains the folder and files.
> git clone https://URL/<main>
> git remote add <component> https://URL/<component>
> cd <main>
> git subtree add --prefix external/<component> <component> master
ERROR: prefix 'external/<component>' already exists.
How do I solve this or, is there a better way to have the subtree structure recreated for new clone operations?