我有一个git仓库中有几个子模块。如何在运行git submodule init后列出所有子模块的名称?
发布于 2018-03-05 10:22:49
git config --file .gitmodules --name-only --get-regexp path
将显示所有子模块条目,并使用
git config --file .gitmodules --get-regexp path | awk '{ print $2 }'
将获得子模块路径本身。
发布于 2018-03-05 10:41:41
可以使用以下命令。
grep path .gitmodules | sed 's/.*= //'
https://stackoverflow.com/questions/-100003568
复制相似问题