1

I have one requirement How to remove submodule from .gitmodules file using command ?

Can anybody assist on this?

VDN
  • 498
  • 3
  • 15
  • Possible duplicate of [How do I remove a submodule?](http://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule) – qzb Sep 28 '16 at 12:19

1 Answers1

1

There is no command to do that, you need to do it manually, as the tutorial suggests:

To remove a submodule you need to:

  1. Delete the relevant line from the .gitmodules file.
  2. Delete the relevant section from .git/config.
  3. Run git rm --cached path_to_submodule (no trailing slash).
  4. Commit the superproject.
  5. Delete the now untracked submodule files.

However, you could also just issue git submodule deinit on the submodule - but it doesn't remove it from .gitmodules.

1615903
  • 32,635
  • 12
  • 70
  • 99