Is it possible to clone a submodule in git without getting its master branch?

527 views Asked by At

Say that I have a repo A, that has a submodule B. B has a branch X that A is interested in. Is it possible to clone A, and then get branch X for B, without also pulling down B's master. I tried having .gitmodule specify branch X for B, "git submodule update --single-branch -- path_to_B", changing submodule fetch refspec to include the branch X only, but seems that B's master always gets pulled. Is it possible to not get master branch of B when cloning repo A?

0

There are 0 answers