Technology

git grep

A lightning-fast command-line utility built directly into Git to search tracked files, the index, and historical commit trees for matching patterns.

When you need to find a specific string or regex pattern across your codebase, skip the slow filesystem searches and rely on git grep. Because it targets only files tracked by Git (or specific commits and branches), it bypasses node_modules and other untracked noise automatically. You can pinpoint patterns with flags like -n for line numbers, -p to show the containing function, or target historical snapshots by passing a commit hash (such as git grep 'TODO' HEAD~5). It is a highly optimized, native alternative to standard grep that respects your repository structure out of the box.

https://git-scm.com/docs/git-grep
1 project · 1 city

Related technologies

Recent Talks & Demos

Showing 1-1 of 1

Members-Only

Sign in to see who built these projects