0

Say i have a repo that has two branches: main and feature. Now i want my feature branch to depend on another repo as a submodule but i want that submodule to be visible only to that feature branch not to the main branch. I have already tried:

  1. switch to feature branch
  2. add my submodule there
  3. switch back to main branch, but here the submodule remains visible which i don't want.

How is it possible ?

moctarjallo
  • 1,479
  • 1
  • 16
  • 33
  • Does this answer your question? [git clean is not removing a submodule added to a branch when switching branches](https://stackoverflow.com/questions/9314365/git-clean-is-not-removing-a-submodule-added-to-a-branch-when-switching-branches) – Ôrel May 31 '22 at 21:11
  • This is one of the many reasons that people still call them "sob"-modules. Submodules are good for some very specific uses; this isn't one of them. They might still be your best bet, they just have this rough edge here. – torek Jun 01 '22 at 01:52

0 Answers0