Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Submodule head

Xeron Xeron March 28, 2013

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]?

1 answer

0 votes
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 1, 2013

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.

Xeron Xeron April 2, 2013

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)?

stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 3, 2013

Difficult to say without seeing the repository, but that annotation is simply what git reports from 'git submodule status'.

Jack Ront January 5, 2016

@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?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events