git diff file against its last change

Is it possible to get git to produce a diff between a specific file as it exists now, and as it existed before the last commit that changed it?

That is, if we know:

$ git log --oneline myfile
123abc Fix some stuff
456def Frobble the foos
789dba Initial commit

Then git diff 456def myfile shows the last change to myfile. Is is possible to do the same without the knowledge produced by the git log; what changed in 123abc?

3 Answers
3

Leave a Comment