Is it possible somehow for GIT to find which commit introduced a specific line of code in a specific file? This is assuming that there have been many commits since that line was added. Or is this something that must be done in a script while looking at the git blame of all the commits for the file in which the line is present?
To clarify
Original file->Line Added to file and committed -> Many other commits adding other lines and changing the code
You can use
git blame -l filenameto get the SHA1 hash from when the line was changed.You also can use –reverse:
See: http://www.kernel.org/pub/software/scm/git/docs/git-blame.html