1 year ago
#370813
Samaursa
Share the remotes that are added locally to make working with git subtree a bit easier
Going through the tutorial here: https://www.atlassian.com/git/tutorials/git-subtree
On the surface it seems that subtrees
are more work than submodules
with multiple members on the team.
For example, if I have 10 submodules and add an 11th one the submodule remote url is added to the repository itself. All my colleagues have to do is run git submodule update --init --recursive
and things work as expected. They don't need to know the submodule details.
With subtree, I have to either add a script or ask all my colleagues to manually add the remotes. From the tutorial: git remote add -f tpope-vim-surround https://bitbucket.org/vim-plugins-mirror/vim-surround.git
. This is tedious and error prone (or requires us to maintain a script to add the remotes - which could lead to conflicts if there is a remote name that already exists).
This becomes even more painful when a new maintainer joins the group and now has to setup all 11 remotes. I hope I am missing something here that makes subtrees easier to use in a large team?
git
git-subtree
0 Answers
Your Answer