Search code examples
gitgit-submodules

How to list the URL for all Git submodules?


The "git remote get-url origin" can be used to fetch the location of the remote. How do I do the same for all the submodules?


Solution

  • Run the command for every submodule:

    git submodule foreach --recursive git remote get-url origin