In SouceTree (latest version) if I make a change to some code in a submodule there appears to be no indication at all in the main repository of that change. I'd have to remember to open the submodule to see it.
Am I missing something? Is this by design? We're looking at using submodules in some scenarios where the code there will be updated, but I'm afraid without some kind of visual indicator in the root project that people will forget to check in their submodule code changes.
Git actually ignores uncommitted changes to any nested submodules until you commit those changes, at which point it shows up in the parent repo as a change to the submodule commit that you're tracking.
However, SourceTree supplements this by checking if there are uncommitted changes to your submodules when you try to commit or push the parent. This check is optional (you can disable it in Preferences > Git > Check submodules before commit & push) because some people don't like the extra time it takes to check this when you hit commit/push, but it can be very useful in the kinds of circumstances you describe.
So although you won't see uncommitted changes to submodules in the parent repo, you will get reminded about them when you try to commit or push. SourceTree even lets you commit the submodule changes as a nested dialog inside the parent commit dialog when this occurs so you can do it all in one joined-up sequence.
Hope that helps.
Oh, and I totally forgot that there's something else - in the sidebar, SourceTree queries submodule state for you and will display an annotation of '...' if there are uncommitted changes, like so:
If you've committed and haven't pushed, it's an up arrow.
Is this still true? I am using version 188.8.131.52 under Windows and I see no hint in the SUBMODULES section of the main repo regarding the state of its submodules.
Hi folks, While the full post is over on our blog I'd like to share the dark theme we've got planned for 2019 here directly as well to keep the discussion going. The ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events