Reputation: 1784
I have 2 different files foo
and bar
.
Each one is on 2 different commits, on the same branch, respectively with SHA1 SHA1-foo
and SHA1-bar
.
I want to see a diff between those 2 files.
I could checkout one of the files and copy it but maybe there's a better way.
Upvotes: 1
Views: 578
Reputation: 1784
I found that it works the same way as branches, see this SO thread.
git diff SHA1-foo:/path/to/foo SHA1-bar:/path/to/bar
Upvotes: 5