You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Is it possible to make SourceTree not do a recursive submodule checkout when switching between branches? Even though the original checkout was done without submodule recursion, a branch switch always does this:
git -c diff.mnemonicprefix=false -c core.quotepath=false submodule update --init --recursive
We are having a project where the number of submodules increased to +50. Because of the lack of this option we stopped using SourceTree because you can guess that switching a branch was a real PITA.
An other point for this option is that not every developer has access to every submodule, so he gets an error message on every pull and checkout what causes in addition a parent repository with damaged submodules.
IMHO the idea of submodules is that you can decide yourself to clone it or not. If I only want to make a small change within the 100 kb big parent repository I do not want to clone 2 gb of submodules.
Looking forward to see this option back again in SourceTree.
to a) i do not see this as a problem. This is just as any other developers bug, like forgetting to add a new file to git. This should (imo) not be fixed by "special" submodule checkouts. to b) I don't see this as a problem. Checking out submodules detached is the standard behaviour of git submodule update.
I see two problems with submodules: a) if some team members are not using them properly (i.e. not commiting the submodule hashes in main repo) then every checkout in main repo is a pain, b) It is checking out comits (not branches) on submodules, so each checkout on main repo detaches other repos. The option to disable this feature would be fine.
--recursive can be an issue if you've set up your submodules in a way where you want more control over how they get initialized. Such as, if any of your submodules of your application also have your framework as a submodule, recursive will check out N number of that framework. One of the downsides to submodules, really, but the frustrating thing was how Sourcetree didn't have an option to disable it. Although, as you can see below it now is an option under `Settings`.
What is the problem with --recursive? In our project we need recursive updates because have nested submodules.