Git tip: how to search (grep) a repo and its submodules

,

git grep is a useful tool to quickly search through source code to find something and ignore generated or transient build files. git grep can also search submodules with the --recurse-submodules option. Example:

git grep --recurse-submodules "imx-boot"

This is super handy when working with the Yoe distribution if you don’t know what meta-layer something is in.

This also illustrates why using git submodules for super-project management often makes a lot of sense. You can leverage a host of other tooling that is likely not available when you build a custom super-project management tool.

Neat! Never knew it even existed!