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 --onelineOptions
| Flag | What it does |
|---|---|
| --oneline | Compact commit headers |
| -p | Show the full patch too |
| -- <path> | Limit to changes under a path |
| --since / --until | Filter 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
git log: Usage, Options & Common CI Errorsgit log shows commit history with flexible formatting. Reference for --oneline, --graph, --pretty, ranges, an…
git diff-tree: Usage, Options & Common CI Errorsgit diff-tree is the plumbing command that compares two tree objects. Reference for -r, --name-only, --no-com…
git cherry: Usage, Options & Common CI Errorsgit cherry shows which commits on a branch have or have not been applied upstream. Reference for -v, the + /…
git show: Usage, Options & Common CI Errorsgit show displays a commit, tag, or object with its diff. Reference for --stat, --name-only, blob viewing, an…