The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Rename a Submodule containing folder

Thomas
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 24, 2021

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 = https://github.com/proteusthemes/WAI-ARIA-Walker_Nav_Menu.git

.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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events