Reputation: 10260
Is there a way, similar to Github's abilities, so search for code in Git history subsetted to within certain folders? https://help.github.com/articles/searching-code
Another SO question discussed how to search in general, How to grep (search) committed code in the git history?
thank you!
Upvotes: 1
Views: 53
Reputation: 1
This should do it
git log -p -S <string> -- <path>
-p Generate patch (see section on generating patches). -S <string> Look for differences that introduce or remove an instance of <string>. Note that this is different than the string simply appearing in diff output.
Upvotes: 1