I'm using SourceTree on Mac. I have a Git repository with submodules. In SourceTree, these submodules are listed like this:
SUBMODULES
submodule1 [master]
submodule2 [master]
...
I made a tag recently, and since then one of the submodules appears like
submodule1 [tag]
although I haven't commited the tagged revision of the submodule in the parent repository. This is only cosmetic, but how can I make it look like before:
submodule1 [master]?
Submodules actually track a specific commit so that the parent knows precisely what version of the submodule it's supposed to be using. So it's not unusual for the annotation to change, it might even be a SHA if there are no 'friendly' names for the commit that you're tracking on the submodule project. You shouldn't worry about this, all you need to be sure of is that you're tracking the right commit on the submodule.
If you want to change the commit you're tracking, you just open the submodule project (double-click on the sidebar), check out a different commit there, then return to the parent repo and commit the submodule change.
Sure, but why it was changed to [tag] since neither the tracked commit was the tagged one, nor anything was commited in the base repository (i.e. tracked commit not changed)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Difficult to say without seeing the repository, but that annotation is simply what git reports from 'git submodule status'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Steve Streeting I realize this post is more than two years old now. However, it appears that since the release of v2.1 the additional [whatever] tag has been removed from the interface. I found it extremely useful and haven't found a way to turn it back on. Is there any way to enable it again?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.