- 
    Bug 
- 
    Resolution: Unresolved
- 
    Minor 
- 
    None
At the moment, the git plugin tries to get the list of submodule by parsing the config:
git config -f .gitmodules --get-regexp ^submodule\.(.*)\.url
If you switch between different branches, you could end up with submodules defined in the config file but not used by git (as a git submodule status command shows).
The git plugin will then try to update all found submodules in the config and fail when trying to update an unused - but in .git/config - submodule.
That's why it would be better to retrieve the list of submodules from the git submodule status command instead.
- duplicates
- 
                    JENKINS-38860 Git plugin using local config to update submodules -         
- Closed
 
-         
- is duplicated by
- 
                    JENKINS-44802 check in of a bad .gitmodules files causes the job to fail until manual intervention -         
- Closed
 
-         
- is related to
- 
                    JENKINS-45243 Git Submodule checkout -         
- Closed
 
-