I have a repo called "dev_repo" in which I have added two different repo's (**sub_dev_repo_a **and sub_dev_repo_b) as submodules with the following commands
- git submodule add -b development_branch<url of sub_dev_repo_a>
- git config -f .gitmodules submodule.sub_dev_repo_a.update rebase
- git submodule update --remote
Now, if I clone the dev_repoand do submodule init in another PC, I can see the submodule is pointing to the latest commit of the development_branchof sub_dev_repo_a.
Then, I have added some changes to the development_branch of sub_dev_repo_a- new commit and checked in to the dev_repo
When I try to pull it from the another PC with the command "git submodule update --recursive --remote ", it is not getting updated to the new commit ID of submodule (development_branch) .
What is the correct way to pull the latest changes of submodule every time when a new commit is done to the repo/branch it is pointing to?
Tried following the answers from here - Why is my Git Submodule HEAD detached from master?
Still couldn't get it right.