SyntaxStudy
Sign Up
Home Git Reference git show / git blame

git show / git blame

command

git show displays commit details; git blame shows who last modified each line of a file.

Syntax

git show <commit> git blame <file>

Example

bash
git show HEAD          # show last commit
git show abc1234       # show specific commit
git show HEAD:file.php # show file at commit

git blame file.php
git blame -L 10,20 file.php  # lines 10-20 only