git blameShows each line of a file annotated with the commit hash, author, and date of the last modification. Essential for understanding who changed what and when — not for assigning blame, but for understanding context.
git log --follow <file>Shows the commit history of a specific file, filtering out commits that didn't touch it. The --follow flag also tracks renames, so you see the file's full history even if it was moved.
File historyEvery file in Git has a history of changes. git log --follow shows only commits that modified the file, making it easy to understand how a file evolved without wading through unrelated commits.
View the commit history
Run git log --oneline. There are 3 commits. The latest added logging (by Teammate). We'll use git blame to see who wrote each line of app.py.
● View the commit history
○ Blame the main file
○ Blame a smaller file
○ View file history with git log --follow
○ Check a file with single-commit history
Terminal
📘 Starting tutorial: Git Blame & Log --follow
Trace who changed what with git blame and follow file history