Git: How do I find which commit deleted a line?
11,473
Use git blame
with the --reverse
option:
$ git blame --reverse START.. file.ext
where START is a revision which still contains the line in question.
Related videos on Youtube
Author by
BruteCode
Updated on September 18, 2022Comments
-
BruteCode about 1 month
I know I added a line in a particular commit and can see it in a private GitHub account. In my current branch it isn't in there any more. How do I find which commit removed it?
-
cweiske over 7 yearsThe then following commit is the one that removes the line.
-
polynomial_donut almost 4 yearsIt would be good to add what this does, namely showing each line with the last commit on which it still existed.