I had to make some changes to a repo to dockerize it. Initially the submodule pointed at the original repo, so I went back and switched it to a fork and branch, so I could make pull requests as necessary.

reposted Changing remote repository for a git submodule – Stack Overflow

These commands will do the work on command prompt without altering any files on local repository

git config --file=.gitmodules submodule.Submod.url https://github.com/username/ABC.git
git config --file=.gitmodules submodule.Submod.branch Development
git submodule sync
git submodule update --init --recursive --remote
Please look at the blog for screenshots: Changing GIT submodules URL/Branch to other URL/branch of same repository

Posted