I have a project named sample which have 2 submodules sampleA and sampleB. I also have another git repo named Example which also refers to same submodule sampleA and sampleB. When I change something in submodule sampleA from the project Example and pushed into remote. Now the submodule sampleA from the project sample pointing to old commit of the submodule sampleA. I want all of these submodules to point to latest commit.
my .gitmodules:
[submodule "sampleA"]
path = sampleA
url = https://gitlab....sampleA.git
branch = alpha
[submodule "sampleB"]
path = sampleB
url = https://gitlab...sampleB.git
branch = alpha
I have many branches. I need to point the submodule to latest commit of corresponding branch in every project. When i go throw the internet for the solution found solutions similar to this:
Update Git submodule to latest commit on origin
that is to update manually through command ,but i want to do this automatically for remote. otherwise i need to push this to all of my projects. How can i do this?