I often want to look at all of the changes a file has gone through. Sometimes git blame is enough because I’m interested in the most recent change. But when the most recent change to a line isn’t relevant—a formatting change, for example—I need something more powerful. Enter git log.

With git log --follow -p -- myfilename, I can view the entire commit history for a file with a diff of the changes introduced by each commit.