Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Rename a Submodule containing folder


Scenario: I have a project with submodules inside a theme folder. I'd like to copy the entire project as a new project and change the theme folder name. This in turn would require the submodule path created in Sourcetree to be updated. I assumed/hoped I would only need to update submodule path manually in two places. (1) - the root .gitmodules file as well as (2) - the .git file located within the linked submodule folder.

.gitmodules file example (1):
[submodule "wp-content/themes/[CHANGE-THIS-NAME]/dev/vendor/aria-navigation"]
path = wp-content/themes/[CHANGE-THIS-NAME]/dev/vendor/aria-navigation
url =

.git file example (2):
gitdir: ../../../../../../.git/modules/wp-content/themes/[CHANGE-THIS-NAME]/dev/vendor/aria-navigation

While I'm sure these changes are necessary, it does not update the submodules section on the left bar of Sourcetree. It remove the submodules section all together as if it does not recognize they are exist.

My question: Is there a way to rename the containing folder for submodules that sourcetree will recognize?

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Bug Fix: Sourcetree for Windows authentication error when updating to app password

Hello Sourcetree users!!! With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for se...

60,345 views 127 26
Read article

Community Events

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

Events near you