2011-03-07 134 views

回答

2

它將其作爲嵌套存儲庫處理,而不是作爲子模塊處理。
當你發現了,聲明它作爲一個子模塊:

  • 子目錄不應該已經存在,這意味着如果你已經克隆你的第二個回購,則需要將其添加爲之前先將它刪除子模塊。
  • 或者你可以嘗試直接在.gitmodules文件(未測試)進行添加

,將允許創建special entry in the git index referencing the submodule SHA1,因爲shown here和詳細的SO問題「Nested git repositories without submodules?」。

2

第二個倉庫被作爲第一庫的子模塊進行處理。由於您尚未將其定義爲子模塊,因此您無法使用git submodule命令與其進行交互,但所有其他命令都將其視爲子模塊。

+0

OK ...現在我已經將我的存儲庫置於此狀態,我該如何告訴'git submodule'將第二個存儲庫視爲子模塊? – jnylen 2011-03-07 06:21:02

+0

@jnylen:'git submodule add git://github.com/tpope/vim-abolish.git bundle/vim-abolish' – Arrowmaster 2011-03-07 06:23:18

+0

(通常只是添加子模塊)在我吹走了已經存在的東西之後才起作用。儘管夠了,謝謝。 – jnylen 2011-03-07 06:32:20