Sourcetree does not sync submodules when .gitmodules file is modified

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Medium
    • None
    • Affects Version/s: 3.4.25
    • Component/s: General
    • None
    • Severity 3 - Minor

      After a Bitbucket URL change, branch checkouts fail during recursive submodule checkout.

      Our Bitbucket DC server URL changed recently.  Our admin pushed updated an .gitmodules file to the develop branch of the main repo and each submodule repo, and submodule commits were updated in all repos accordingly.

      When users checkout /pull the latest develop branch, the updated .gitmodules file should point all submodules to the new Bitbucket URL.  This doesn't happen and recursive checkout fail at the first submodule.

      Repo layout:-

      Repo A
        Submodule 1 (Repo B)
          Submodule 2 (Repo C)
            Submodule 3 (Repo D)

      Users have the setting 'Perform submodule actions recursively' enabled in Tools > Options > Git tab.

      Users manually changed the Repo A URL in Sourcetree > Repository menu > Repository Settings > Remote repository paths list (we have only one remote named 'origin').

      Issue:

      User checked out or pulled the develop branch in the main repo.  The updated .gitmodules file was pulled, but the submodule repo URL did not sync and remained at the old URL, causing the recursive checkout to fail.

      Expected:

      Sourcetree should recognize the .gitmodules file change during checkout/pull and sync the submodule git config.

      Note that if the .gitmodules file is edited manually, then discarded in Sourcetree, this change is recognized as a special case and Sourcetree runs the command 'git submodule sync'.  The command not run when other files are discarded.  This is should also happen when the .gitmodules file changes during branch checkout / pull operations.

            Assignee:
            Unassigned
            Reporter:
            Kris DeMuth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: