Search code examples
gitgit-diff

How to search a string in a diff


How to find all the files that contain a change of a given substring in a diff?

Or in other words, how to filter the diff by a substring and showing only the files that contain that substring as a change (+ or -)?


Solution

  • I think you are looking for git diff -S<string>, checkout the diffcore pickaxe documentation here : diffcore pickaxe