IntelliJ IDEA or any of the JetBrains IDEs based on that platform (RubyMine, WebStorm, etc.) have this built-in: right click in the gutter and choose Annotate. Mouse over a line to see the commit message for the most recent change to that line. http://www.jetbrains.com/mps/whatsnew/screenshots/20/annotat...
"git blame" helps too - yes, you know it was you, but that tells you what commit added that line. Now do "git log -p 31dc4a" (or whatever) to see the commit's comments.