git log -S "mention here line of code" [file-path]
For example:
git log -S "First line" test.txt
Providing the file name with its path is obvious because, most of the time, we want to know who introduced a particular code segment in a particular file.