How do I record my repo's subtree settings?

Viewed 37

I created a subtree in my main repo by following the instructions here: How to move a subdirectory into a separate Git repository.

However I don't see any step that records this setting into my main repo. After I push a commit and clone a clean copy from Github, the new one doesn't know anything about the subtree I set up.

How do I get the main repo to remember my subtree setup, so that I can push and clone it (e.g. to another machine)?

1 Answers

It is not a subtree you created. According with article's name you created separate repo inside your main repo with usage of git subtree split command. For creating subtree repo you have to use git subtree add command after point "Preparing the current repository". You could see this. After adding subtree and pushing changes to remoute main repo, your main project will know about this subtree. And if you will clone it, subtree folder will be inside.

Related