Config and Shell Integration/Search only changed files

Pipe a changed-file list into ripgrep.

Section: Git and toolchain workflows

Search only changed files

bash
bash
git diff --name-only main...HEAD | rg '\.ts$'
Explanation

This is a quick way to focus on the files touched in a branch.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Git and toolchain workflows
Search tracked files only
Restrict ripgrep to files known to git.
OpenIn sheetbashsame section
Find candidate files with fd, then search with rg
Combine fast file discovery with fast content search.
OpenIn sheetbashsame section
Use ripgrep for live fuzzy-finder reloads
Power an interactive search UI in fzf.
OpenIn sheetbashsame section
Open ripgrep results in Vim quickfix
Feed matches into an editor workflow.
OpenIn sheetbashsame section
Point ripgrep at a config file
Set a path that ripgrep reads for default arguments.
OpenIn sheetbash1 tag match
Emit vimgrep-style results
Print `file:line:column:text` output for editors.
OpenIn sheetbash1 tag match