From: Carlos Pita Date: Mon, 12 Oct 2015 19:48:09 GMT Subject: Add submodule specifying depth and branch at the same time won't work Message-ID: For example, I can do: git clone --depth 1 --branch devel git@gitlab.com:memeplex/bash.git But if I try: git submodule add --depth 1 -b devel git@gitlab.com:memeplex/bash.git I get: fatal: Cannot update paths and switch to branch 'devel' at the same time. Did you intend to checkout 'origin/devel' which can not be resolved as commit? Unable to checkout submodule 'src/aur/bash' I think the devel branch is left outside the update because depth is just 1, but then the same could be said for the clone, which just works. The request should be interpreted as depth 1 inside devel branch.