FahamLah

Commands

git blame

git blame [-L <start>,<end>] <file>

Risk: Safe

What it does

Shows who last changed each line of a file, and in which commit.

When to use it

To learn why a line looks the way it does.

Example

$ git blame index.html

Each line gets a commit id, a name and a date.

$ git blame -L 2,3 index.html

Look at lines 2 to 3 only.