Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git pull with config "recurse=true" doesn´t update all submodules

I have run the following git command to update my config:

git config --global submodule.recurse true

The entry in .gitconfig now looks like this:

[submodule]
    recurse = true

My expectation was that afterwards a git pull would also update all my submodules. But running

git submodule update --init –recursive

again after the pull did still update some submodules.

Am I misunderstanding the effect of the config-setting or are there situations where git pull will still not update a submodule?

like image 304
Earl Pingveno Avatar asked Dec 06 '25 07:12

Earl Pingveno


1 Answers

Is your issue that new submodules introduced by the pull aren't being created by git pull? If so then that is a known bug, see git help pull;

BUGS

Using --recurse-submodules can only fetch new commits in already checked out submodules right now. When e.g. upstream added a new submodule in the just fetched commits of the superproject the submodule itself can not be fetched, making it impossible to check out that submodule later without having to do a fetch again. This is expected to be fixed in a future Git version.

like image 57
Adam Avatar answered Dec 07 '25 21:12

Adam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!