if a line is modified back and forth between 2 versions several times, git blame seems to show only the latest commits on that line.
would it be possible to let it show all commits on that line?
Annotations for lines modified in the current revision, are marked with bold type and an asterisk. But I think it is important to clarify that this refers to lines modified in the current revision of the file, not the current revision of the repository.
Summary. The git blame command is used to examine the contents of a file line by line and see when each line was last modified and who the author of the modifications was. The output format of git blame can be altered with various command line options.
The git blame command is used to know who/which commit is responsible for the latest changes made to a file. The author/commit of each line can also been seen. There are many other options for blame, but generally these could help.
I don't know about showing all commits on that line at the same time, but you can "drill" through each change to the line by using git blame SHA~ -- filename
. With each iteration of the blame, just insert the next most "recent" SHA which modified that line.
Example: The first time you run git blame foo.php
you see the line was modified by f8e2e89a
, so then you exit out and run git blame f8e2e89a~ -- foo.php
, git will then show you who modified the line before f8e2e89a
. Rinse and repeat as necessary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With