Changing git submodule repo after you started editing it

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.

bash-4.4$ git config --file=.gitmodules -l
git config --file=.gitmodules -l
submodule.indieauth.com.path=indieauth/indieauth.com
submodule.indieauth.com.url=https://github.com/aaronpk/IndieAuth.com.git

bash-4.4$ git config --file=.gitmodules submodule.indieauth.com.url https://github.com/dougbeal/IndieAuth.com.git
git config --file=.gitmodules submodule.indieauth.com.url https://github.com/dougbeal/IndieAuth.com.git
bash-4.4$ git config --file=.gitmodules submodule.indieauth.com.branch docker-fixes
git config --file=.gitmodules submodule.indieauth.com.branch docker-fixes

bash-4.4$ git submodule sync
git submodule sync
Synchronizing submodule url for 'indieauth/indieauth.com'

bash-4.4$ git submodule update --init --recursive --remote
git submodule update --init --recursive --remote
From https://github.com/dougbeal/IndieAuth.com
 * [new branch]      docker-fixes -> origin/docker-fixes
bash-4.4$ git config --file=.gitmodules -l
git config --file=.gitmodules -l
submodule.indieauth.com.path=indieauth/indieauth.com
submodule.indieauth.com.url=https://github.com/dougbeal/IndieAuth.com.git
submodule.indieauth.com.branch=docker-fixes

bash-4.4$ 

Leave a Reply

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)