Locate Git submodule config file

Git submodules don’t put their individual Git config file under .git/config. This Git command issued from the Git submodule directory tells the file path to the Git submodule config file:

git rev-parse --git-path config

Say a repository “alpha” has submodule “beta”. Find the Git config file location of “beta” from “alpha” like:

git -C beta rev-parse --git-path config

# OR

cd beta
git rev-parse --git-path config