-5
我有一個典型的紅寶石項目,我想在該項目中包含一個子模塊。子模塊位於github上。我如何使用git submodule命令將子模塊包含在我的項目供應商/插件目錄中?我有一個紅寶石項目,需要從github子模塊
謝謝。
我有一個典型的紅寶石項目,我想在該項目中包含一個子模塊。子模塊位於github上。我如何使用git submodule命令將子模塊包含在我的項目供應商/插件目錄中?我有一個紅寶石項目,需要從github子模塊
謝謝。
從git submodule --help
,我們可以看到:
git submodule [--quiet] add [-b branch] [-f|--force]
[--reference <repository>] [--] <repository> [<path>]
因此,考慮到在一個倉庫 「我-插件」 「[email protected]:我的用戶/我的-plugin.git」,你會用
git submodule add [email protected]/my-user/my-plugin.git vendor/plugins/my-plugin
git submodule add (url of repo) vender/plugins/(submodule name)
Pro Git是常見的git的一個很好的參考命令
-1:** 「這個問題沒有表現出任何的研究工作」 **。你嘗試過`git submodule --help`嗎?這是submodule命令最基本的用法,即使是最小的努力,您也應該能夠自己回答。 – meagar 2011-12-13 18:35:23