I'm pretty sure this has been answered before, but I can't find a good one for me. Whats the best way to integrate a repository, which should be up-to-date, in another? This repository should exist in a few other repositories. I've read about
I tried submodules but for a git newcomer like me, it seams very complicated. In my idea, when I pull the repository, the sub-repo should also update itself. Is there another, easy way I have missed?
Example: The repository Source_Global should be in repository MyFramework as well as in MyGameEngine.
I'm working with TortoiseGit on Windows.
It's been a few years since the last answer, so I think it's worth revisiting this question.
Submodules
This appears to be the most widespread way to handle your situation (at least according to Google Trends). But there are plenty of complaints online about how it's difficult to use. To wit:
Subtrees
I think the Git implementation for subtrees is much more user-friendly than submodules. Subtrees are affected by none of the three issues I listed above. But TortoiseGit still doesn't support creating, pulling, or pushing subtrees. (You can view and commit to them, though.) You can try Atlassian Sourcetree as a substitute, but that has its own drawbacks.
I think of subtrees as the talented but neglected sibling of submodules.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With