Let's say I have a repositiory Repo and now I want to add folder Common which is separate repository. So the structure should be as following:
Repo
myfile.txt
Common
anotherfile.txt
As I know there are at least 2 ways to do that: subtrees and submodules. After reading some git tutorials and manuals I came to the conclusion that subtree is what I want.
Ok, so I've added the folder to my repo:
git subtree add --prefix Common https://github.com/my/Common.git master --squash
Ok, now it looks as expected. After some time I want to update the subtree folder. But unfortunately the only way I've found so far is:
git subtree pull --prefix Common https://github.com/my/Vommon.git master --squash
Why should I again enter the repository Url? Isn't that stored somewhere in the git structure? What if I have several subtrees? I don't think that someone remember all the urls.
Is there a way to do that in some simple way? Maybe I'm missing something?