'Push Submodules in source control Panel

I have a local repository with n number of submodules in it.

sometimes i work on these sub-modules and make changes to it.when i wanted to commit and push these into remote repository what i do is i goes inside of each sub modules and do the commit and push individually which is time consuming and repetitive

What i want is i want to push these sub-modules changes in one click without going through each sub-modules

Is there any way to push all the sub-module changes in single click?

I am using VSCode editor



Solution 1:[1]

A git push from the parent repository should be enough:

git push --recurse-submodules=on-demand

If on-demand is used, all submodules that changed in the revisions to be pushed will be pushed.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 VonC