Geoffrey Hale
Geoffrey Hale

Reputation: 11438

After reverting a file to a previous revision git diff shows no differences?

After reverting a file to a previous revision in git

git checkout abcdefg myfile

git diff myfile <-- shows no results.

Upvotes: 5

Views: 1418

Answers (1)

Geoffrey Hale
Geoffrey Hale

Reputation: 11438

The revert pulls changes to staging so you have to use

git diff --cached myfile

Upvotes: 4

Related Questions