BACK TO ALL HACKS
HACK / 071
DEVELOPERDIFFICULTY: MEDIUM
Find The Exact Commit That Changed A Line
Use Git blame to trace a line back to the commit and author that changed it.
STEP-BY-STEP EXECUTION
01
Run `git blame path/to/file`.
02
Copy the relevant commit hash.
03
Run `git show <commit>`.
04
Read the surrounding change and message.
THE BIG TAKEAWAY
Git history can explain code that looks mysterious today.
#Git#Debugging#Developer