我正在为我的 MacVim 安装创建一个 git 存储库。我的存储库中的一些插件有自己的 .git 文件夹和存储库。问题是......当我尝试将这些文件夹之一添加到我的主存储库时,它什么也不做。
我猜:
我无法添加该文件夹,因为它本身就是一个 git 存储库。我必须添加为子模块或删除 .git 文件夹。
如何将我的子仓库添加为子模块?
bryan-mini:.vim bsaltzman$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: bundle/YouCompleteMe (modified content)
# modified: bundle/nerdtree (modified content)
# modified: bundle/ultisnips (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
// This
bryan-mini:.vim bsaltzman$ git add bundle/YouCompleteMe/
// OR THIS
bryan-mini:.vim bsaltzman$ git submodule add bundle/YouCompleteMe/
repo URL: 'bundle/YouCompleteMe/' must be absolute or begin with ./|../
bryan-mini:.vim bsaltzman$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: bundle/YouCompleteMe (modified content)
# modified: bundle/nerdtree (modified content)
# modified: bundle/ultisnips (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")