Posted on

This pages collects my tips and tricks for challanges with git that I often encounter. These are mainly tested on Git for Windows.

Clone repository including submodules

Normally git clone does not also clone any submodules (i.e. git repositories within the git repository) when cloning. This behaviour can be changed using the --recursive flag1.

git clone --recursive $repo

Download submodules manually

If you already have cloned the parent repository, you can still clone the submodules manually2.

git clone $repo
cd $repo
git submodule update --init --recursive
comments powered by Disqus