git cloneするときに--recursiveをつけると,サブモジュールもcloneしてくれる.
リポジトリがサブモジュールを持ってるときだけgit submodule update --initするのは難しいので,勝手にやってくれるのは良いと思う.
こんな感じ.
% git clone https://github.com/unconed/TermKit.git --recursive Cloning into TermKit... remote: Counting objects: 2574, done. remote: Compressing objects: 100% (1099/1099), done. remote: Total 2574 (delta 1431), reused 2502 (delta 1385) Receiving objects: 100% (2574/2574), 18.12 MiB | 510 KiB/s, done. Resolving deltas: 100% (1431/1431), done. Submodule 'Node/socket.io-node' (https://github.com/LearnBoost/Socket.IO-node.git) registered for path 'Node/socket.io-node' Cloning into Node/socket.io-node... remote: Counting objects: 4046, done. remote: Compressing objects: 100% (1883/1883), done. remote: Total 4046 (delta 2088), reused 3742 (delta 1858) Receiving objects: 100% (4046/4046), 4.43 MiB | 380 KiB/s, done. Resolving deltas: 100% (2088/2088), done. Submodule path 'Node/socket.io-node': checked out '054e818bd981c4af28f55c55d409f412d86c63b8'