How to git blame a deleted line?
March 30, 2026 by John Rei Enriquez
blame
git
tips
When reviewing PR's or diff hunks its easy to git blame changed lines but what if we wanted to know who and when a line was deleted?
git log -S "deleted line here" <file-path>
Yeah, not really a git blame command but we get to know what last touched it
Just pop this command in the terminal and it will show the last commit that touched the file that matched the string you provided.
Its not everyday you look for a deleted line but every once in a while you will and having this will save you time figuring it out.