ある Git リポジトリを別の Git リポジトリのサブディレクトリとして扱いたい場合のメモ。
リンク
branch を指定する場合の例
$ git submodule add -b branch-name git://github.com/chneukirchen/rack.git rack
クローンしたリポジトリのサブモジュールを展開する
git clone 直後 submodule の中は空。
(git submodule status すると 頭に『-』が付いてる)
下記コマンドで展開する
git submodule init git submodule update
git clone --recursive git://github.com/foo/bar.git