nc.
nc.

Reputation: 7259

How do I see the list of changed files for a single commit, in Git?

When I say git status I get a list of changed files. I'd like to get a list of changed files for a commit. Is there a way to use git show or some other command to do that? Thanks.

Upvotes: 18

Views: 5370

Answers (2)

bdonlan
bdonlan

Reputation: 231433

Yes, simply pass the --stat flag:

git show --stat 1268afe676e

For commits, git show takes the same formatting arguments as git diff-tree, so see the latter's documentation for other formatting options.

Upvotes: 34

Natan Yellin
Natan Yellin

Reputation: 6397

Yes, use git log --stat or git log --stat COMMIT

Upvotes: 3

Related Questions