If I found a bug in my application, sometimes I need to know which commits have affected to the bug source code line. I'm wondering which is the best approach to do it with Git.
I'd use the
git blame command. That's pretty much exactly what it is for. The documentation should get you started.