I have a line of code that has recently been changed to an idle state.
How to find out who and in what commit changed this particular line?
I tried
git log -Sone_distinct_string_from_that_line --pretty=format:'%h %an -- %s -- %ad'
Which shows all commits with comments and authors that haven't changed anything, where the line contained "one_distinct_string_from_that_line", but how can I see the actual changes they made?
EDIT:
I also installed git-guiand looked at the line with git gui blame filename, but for this line there is only one commit change, although there were definitely more changes.
I checked with the graphical gui smartgit to see all the changes made to this file manually and found 3 commits where this line was explicitly edited (was deleted first #and then added again in another commit)
Is there any other way that does not relay the git guilt functions and does not resolve under the assumption that the string is in commit-diff?
source
share