Skip to content
Latchkey

git whatchanged: Usage, Options & Common CI Errors

git whatchanged lists each commit together with the files it changed.

whatchanged is an older, log-like command showing per-commit file changes. It still works, but git log --raw / --name-only is the documented, preferred way today.

What it does

git whatchanged walks history like git log but defaults to showing, for each commit, the list of files it modified (in raw diff format), making per-commit file churn easy to scan.

Common usage

Terminal
git whatchanged --oneline
git whatchanged -p -- path/to/file
git whatchanged --since="1 week ago"
# modern equivalent:
git log --raw --oneline

Options

FlagWhat it does
--onelineCompact commit headers
-pShow the full patch too
-- <path>Limit to changes under a path
--since / --untilFilter by date

Common errors in CI

whatchanged is deprecated in favor of git log, so prefer git log --name-only / --raw for new scripts to avoid relying on legacy defaults. On a shallow clone it shows only the fetched commits, which can make file-history reports look truncated.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →