In fact, all git diff are related to commit: the above compares trees / files in abc000 with tags in def555 . If, for example, def333 modifies dir/file , but there is no change in dir/file between abc000 and def555 (for example, a change in def333 canceled by something along the way), you may not see dir/file there at all.
In general, changes made to def333 will change dir/file in the way that appears when comparing a version in abc000 with one in def555 . So you are likely to see this change.
The easiest way to get diff, which shows "what def555 would look like if def333 was returned," should do just that: create a tree (on a temporary branch) with the modified change. To do this with the actual named branch, you can do something like this:
git checkout def555
What if you do not need the temp branch? Well, this is trivial: just don't create. Get a “separate HEAD” as above, return as above, and then git checkout somebranch . There is no temporary branch for deletion, other than an unnamed one, which git will warn you to leave ... this is exactly what you wanted.
torek
source share