1

I have fork of a repo as submodule and I have separated branch (that is pull request BTW) and I want my repo to use that feature branch as default for submodule so people that clone my repo will use that feature branch. How can I do this?

jcubic
  • 61,973
  • 54
  • 229
  • 402

1 Answers1

1

I don't think so: a submodule is there to record a specific commit to be reused.

Other users cloning your repo will update that submodule at that same commit SHA1 (in a detached HEAD mode), they won't see a branch.
This is what is explained in:

Once updated, a user can go into that submodule, checkout a branch and link it to a remote tracking branch of the corresponding remote repo for that submodule if he/she wants.
But once the modifications are done, that branch won't be part of the submodule information recorded by the parent repo.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250