git - How to find which commits removed a line that contain a specific string? -


i have file no longer referenced anywhere in code. looking find commits removed reference file. (i have no idea files used reference it).

i know git log -s find commits either added or removed string. looking ability limit search lines removed. possible?

i see easier solution. shell-scripting like:

for id in $(git log -sstring --pretty=%h)   if [ "$(git show $id | grep "+.*string")" != "" ]       echo $id   fi done 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -