forbid-new-submodules prevents accidentally adding git submodules. It should check staged files for new .gitmodules entries or 160000 mode objects in the index and exit non-zero if any are found.
repos:
- repo: builtin
hooks:
- id: forbid-new-submodules
forbid-new-submodulesprevents accidentally adding git submodules. It should check staged files for new.gitmodulesentries or160000mode objects in the index and exit non-zero if any are found.