Submodule does not track branch/commit

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Git

      Cloning a repository containing a submodule the .gitmodules contains a reference to the submodule URL, as well as a branch that I assume is used to track progress in the origin of the submodule repository.

      As it stands today, the only time I know I can see/affect the tracked branch name is while creating the submodule link. I can change the source URL, but I have no options of changing which branch is being tracked...

      When opening the submodule repository within Sourcetree and actively switch to a branch I would suggest that the submodule reference (in .gitmodules) should update the metadata about which branch it should be checking for new commits.

      As our current submodules points out commits that are not part of the branch we point it at we have quite a few cases where some issues occur:
      a) We don't get any indication if there are newer commits on the same branch.
      b) We get a detached head with no knowledge what branch we would like to commit/branch from if/when we want to work with the actual submodule in its place.
      c) We sometime even loose track of the actual commit pointed at and get no tagged HEAD...

            Assignee:
            Unassigned
            Reporter:
            Patrik Thunström
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: