Answer the question
In order to leave comments, you need to log in
How to find out by whom and in which commit a line was deleted?
Such a question: I need to find out who deleted one line from a file.
That is, someone removed one line from the code, I use phpStrom and you can’t see in the annotations in which commit they did it. Are there any ways to find out?
Answer the question
In order to leave comments, you need to log in
if you know what was in this line, thengit log -S <string> path/to/file
git blame --reverse start_rev..end_rev /path/to/file
--reverse
Walk history forward instead of backward. Instead of showing the revision in which a line appeared, this shows the last revision in which a line has existed. This requires a range of revision like START..END where the path to blame exists in START.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question