DEV Community

Discussion on: What is your favourite Git command?

Collapse
 
alvaromontoro profile image
Alvaro Montoro
git blame

The git blame command shows what revision and author last modified each line of a file.

It can also be used to destroy friendships and create awkward moments at work when the application stops working and you want to check who made the last change to the line of code that breaks everything. Example of a possible conversation:

Steve: Production is down, and I don't know what's happening.
Muna: Did you change anything?
Steve: No! It just started happening all of a sudden.
Muna: There's an error on this line, let me check who made the change with git blame.
Steve: (gulp)
Muna: STEEEEEEEEEEEVE!!!!!

Collapse
 
bhupesh profile image
Bhupesh Varshney 👾

This is ✔️🤣

Collapse
 
opencode profile image
Apruzzese Francesco

I use Visual Studio Code addon to have blame output always on the code until I read it!!!!

Collapse
 
karataev profile image
Eugene Karataev

Yep, WebStorm also has this handy feature showing an author and date of change of every line.
I use it all the time 🤓
annotations

Thread Thread
 
zenulabidin profile image
Ali Sherief • Edited

Gitkraken also has blame built-in and will show the author and commit message to left of every line. Easier than using the terminal.