Guillaume Chevalier
Guillaume Chevalier

Reputation: 10918

git status for a past commit?

how to do a git status to view changed files in a past commit?

NOTE: this question might have already been asked, but phrased much differently. however, I am astounded to see that searching for the following expression on Google yields no useful results: git status for past commit.

Upvotes: 24

Views: 14049

Answers (3)

Guillaume Chevalier
Guillaume Chevalier

Reputation: 10918

I found:

git show --stat --oneline b8351c4

Where b8351c4 is the regarded commit.

Upvotes: 15

eftshift0
eftshift0

Reputation: 30242

git show --name-status <commit>

Upvotes: 29

Mureinik
Mureinik

Reputation: 311528

git status is the wrong command here. If you want to see what a previous commit did you should use git show <commit>.

Upvotes: 6

Related Questions