I have use git blame
and git log file.py
to find changes, but is there a way to see the changes on a specific line on a file? For example: Line 84 on file index.html.
Asked
Active
Viewed 2,593 times
2
-
Use `git blame
` – SaltyEgg Oct 14 '13 at 01:37 -
is there a way to include the specific line I want to look in git command. Maybe something like. git blame
84. idk – irm Oct 14 '13 at 01:38 -
2The `-L
, – SaltyEgg Oct 14 '13 at 01:41` option specifies a line range to show. You can `man git-blame` for more info.
1 Answers
7
Very simple:
git blame -L 84,84 index.html

FelipeC
- 9,123
- 4
- 44
- 38
-
1this is a very direct and simple answer to a simple question - the duplicate is much more complicated, this just works – bdanin Feb 15 '18 at 03:25
-
The question was wrongly marked as a duplicate. The correct answer to the other question involves `git log`, this one uses `git blame`. Two completely different commands that generate completely different output. – FelipeC Dec 13 '21 at 19:56