Skip to main content

Command Palette

Search for a command to run...

Tracking File Changes Between Two Git Commits

Published
1 min readView as Markdown
Tracking File Changes Between Two Git Commits

If you ever need to find which files were modified between two commits, here’s a handy git command for you.

From time to time, I need to get a list of Sitecore items serialized by Unicorn between two commits. This helps me figure out who did what during that period. The following Git command gives me exactly what I need:

git log --stat --oneline <CommitHash_1>..<CommitHash_2> -- "*.yml"

This command lists all files with the .yml extension that were modified between (and including) CommitHash_1 and CommitHash_2.

More from this blog

The Buggy Path

7 posts

My journey through trial, error, and discovery as I explore new software tools and libraries. These are notes for future me and for anyone else who might find them useful.