I am trying to add a submodule with option --branch and --depth together, 
and failed. However, there is no problem if only one of them is applied.

So, this worked:
git submodule add --branch develop 

This is also worked:
git submodule add --depth 1 

But this won't worked:
git submodule add --branch develop --depth 1 

Cloning into 'mysubmodule'...
Password for 'https://an...@bitbucket.org':
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.
fatal: Cannot update paths and switch to branch 'develop' at the same time.
Did you intend to checkout 'origin/develop' which can not be resolved as 
Unable to checkout submodule 'mysubmodule'

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to