Does Git Submodule Update --recursive Override FetchRecurseSubmodules?
I have a submodule who's submodules I don't need. For example:
mainProject - usefulSubmodule - notNeededSubmodule
mainProject, I define my
.gitmodules like so:
[submodule "usefulSubmodule"] path = lib/usefulSubmodule url = https://whatever fetchRecurseSubmodules = false
Then I run
git submodule update --init --recursive after updating, and it seems that this is ignoring the value of
fetchRecurseSubmodules (which I guess may be true according to the documentation https://git-scm.com/docs/gitmodules#Documentation/gitmodules.txt-submoduleltnamegtfetchRecurseSubmodules )
So therefore my question is, how do I disable this behavior without overriding it during update? What is the best way to update all my submodules while respecting that flag?
on-demandthe default for this property if it is not present?
Yes, that is what
git config fetch.recurseSubmodules specifies:
When set to
on-demand(the default value),
pullwill only recurse into a populated submodule when its superproject retrieves a commit that updates the submodule’s reference.
Note: if you want to override locally (for just one command) a configuration:
git -c fetch.recurseSubmodules=on-demand submodule update --init
But in this case, it is not needed (this is just to illustrate how one can set a config for one
- → Authenticate with a cookie using laravel 5.1 and jwt
- → Finding a specific GitLab tag from PHP
- → React: How to publish page on server using React-starter-kit
- → babel-loader, webpack, ES2015 modules: "Element type is invalid"
- → Create a function-attribute of a function, which is, in its turn, a method of an object literal
- → Model Validation in laravel 5.1 not working
- → GIT fatal: loose object
- → Laravel validation required rule not working
- → Axios array map callback
- → Where does this `webpack://` come from for `webpack-dev-middleware`?
- → error when trying to modify project in laravel forge
- → GitHub Pages and Jekyll content duplication and SEO issues
- → Use Laravel repositories with Datatables