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: 

how can i make submodule update when i switch to a different commit in the parent repo in sourctree?

Farhad Majdeteimouri
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!
June 6, 2023

I have nested submodules in my project and when i switch to a different commit on the parent repo the submodules do not update, I tried checking the "recursive" setting in the Options menu, but it did not help!

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Martin Runge
Community Champion
August 30, 2026

Hi @Farhad Majdeteimouri

Welcome to the Atlassian community!
Since this thread is from 2023, is it still relevant for you?

If yes, this is what I would try. The "recursive" checkbox in Sourcetree applies to clone and fetch, not to checkout, which is why nothing happened for you. Check out in Git does not touch submodules unless you tell Git to do so globally.

I would set this once in a terminal (the setting only takes effect for the Git installation Sourcetree actually calls):

git config --global submodule.recurse true

Sourcetree uses your system Git, so after that, a checkout of a different commit also updates the submodule working trees, including nested ones.

Cheers,
Martin

TAGS
AUG Leaders

Atlassian Community Events