相关疑难解决方法(0)

从.gitmodules恢复git子模块

我有一个文件夹,这是一个git repo.它包含一些文件和.gitmodules文件.现在,当我这样做git init,然后git submodule init,后者命令的输出是什么.我如何帮助git查看.gitmodules文件中定义的子模块,而无需git submodule add再次手动运行?

更新:这是我的.gitmodules文件:

[submodule "vim-pathogen"]
    path = vim-pathogen
    url = git://github.com/tpope/vim-pathogen.git
[submodule "bundle/python-mode"]
    path = bundle/python-mode
    url = git://github.com/klen/python-mode.git
[submodule "bundle/vim-fugitive"]
    path = bundle/vim-fugitive
    url = git://github.com/tpope/vim-fugitive.git
[submodule "bundle/ctrlp.vim"]
    path = bundle/ctrlp.vim
    url = git://github.com/kien/ctrlp.vim.git
[submodule "bundle/vim-tomorrow-theme"]
    path = bundle/vim-tomorrow-theme
    url = git://github.com/chriskempson/vim-tomorrow-theme.git
Run Code Online (Sandbox Code Playgroud)

这是这个目录的清单:

drwxr-xr-x  4 evgeniuz 100 4096 ????  29 12:06 .
drwx------ 60 evgeniuz 100 4096 ????  29 11:43 ..
drwxr-xr-x  2 evgeniuz 100 4096 ????  29 …
Run Code Online (Sandbox Code Playgroud)

git git-submodules

66
推荐指数
4
解决办法
3万
查看次数

标签 统计

git ×1

git-submodules ×1