Assuming I have a text file
alex bob matrix will be removed git repo
and I have updated it to be
alex new line here another
Not exactly what you were asking for, but git blame TEXTFILE may help.
git blame TEXTFILE