Last active
July 8, 2021 15:02
-
-
Save LeoMcA/ddf4c70f8d3d88ee364a3c2e80ceb28b to your computer and use it in GitHub Desktop.
Search for references in a codebase to files that have been modified/deleted in git. Requires ripgrep.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff --diff-filter=D --name-only HEAD | grep -o '[^/]*$' | while read line ; do rg -i "$line" . ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff --name-only HEAD | grep -o '[^/]*$' | while read line ; do rg -i "$line" . ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment