git blame
Shows what revision and author last modified each line of a file.
Syntax
git blame [<options>] <file>
Options
- -L <start>,<end>: Annotates only the given line range
- -w: Ignores whitespace when comparing
- -e: Shows the author email instead of the name
- --since=<date>: Shows blame from a given date
- -C: Detects lines moved or copied from other files
Example
git blame src/app.ts git blame -L 10,20 src/app.ts git blame -w src/app.ts
Tip
Use -w to ignore whitespace-only changes in blame output.