From: Lars Schneider Date: Wed, 11 Nov 2015 14:09:18 GMT Subject: [RFC] Clone repositories recursive with depth 1 Message-ID: Hi, I have a clean build machine and I want to clone my source code to this machine while transferring only the minimal necessary amount of data. Therefore I use this command: git clone --recursive --depth 1 --single-branch Apparently this does not clone the submodules with "--depth 1" (using Git 2.4.9). As a workaround I tried: git clone --depth 1 --single-branch cd git submodule update --init --recursive --depth 1 However, this does not work either as I get: fatal: reference is not a tree: Unable to checkout in submodule path How would you clone the repo? Is the behavior above expected? If not, should the "--depth 1" flag be applied recursively to all submodules on a clone --recursive? Has a patch implementing this a chance to get in? Thanks, Lars