This is the perfect case for git blame
.
As per its man page
Annotates each line in the given file with information from the revision which last modified the line. Optionally, start annotating from the given revision.
You can use it like follows
git blame -- filename
Optionally (advisable, I'd say) you can output the result on a file
git blame -- filename > blame.out
and open the file with any editor supporting the git blame
syntax. I use for instance Sublime Text 2.
Other tips from comments:
git gui blame -- filename
will start a basic gui interface, which can be helpful.
Also
git blame -L 42,+1 -- filename
will show only line 42, in case you are interested in a specific line.