Skip to content

Instantly share code, notes, and snippets.

@fathergoose
Created August 10, 2022 23:36
Show Gist options
  • Save fathergoose/787e159b6eb7831cd928b9c956fdc507 to your computer and use it in GitHub Desktop.
Save fathergoose/787e159b6eb7831cd928b9c956fdc507 to your computer and use it in GitHub Desktop.
Use git to get a list of files changed, do a character swap, and let rg search for console.logs
git diff --name-only -z main | tr '\n' '\0' | xargs -0 rg 'console.log'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment