3 ms·
Checkout git subrepo [0] if you also find working with submodules cumbersome. It has a different set of trade offs and works without any problems or changes to
by hakanderyal 2y ago
Checkout git subrepo [0] if you also find working with submodules cumbersome.
It has a different set of trade offs and works without any problems or changes to your workflow if they fit. (Only thing it has problems is rebasing, under specific circumstances)
[0] https://github.com/ingydotnet/git-subrepo https://github.com/ingydotnet/git-subrepo
- IshKebab 2y agoIt would be nice if they could say how it differs to git subtree. Any idea?
- hakanderyal 2y agoJust checked subtree and while they aim to provide the same thing, they are using different ways. - You can mix subrepo commits and main repo commits freely in a single commit, it’ll take care of submitting only the relevant changes when pushing upstream. - Publishing changes from a subrepo iş just a single command. - Subrepo adds a .gitrepo file to the subdirectory for metadata The readme on repo does a good job of explaining things.
- IshKebab 2y agoI haven't ever actually used git subtree to push changes, but I'm pretty sure that all of those are true for it too, and git subtree doesn't need a `.gitrepo` file so that seems like a point in its favour. I'm sure there are advantages to git subrepo, but I am still not sure what they are.
- hakanderyal 2y agoThe downsides from the subtree website [0] doesn’t apply to sub repo. For me, I just use git normally as I would, and do a subrepo push when it’s time. Subtree would make me change my workflow which is a big one for me. [0] https://www.atlassian.com/git/tutorials/git-subtree https://www.atlassian.com/git/tutorials/git-subtree