jemnotesversion 2 / featuring this entry or see all/search

Dec 6
git’s user interface isn’t very consistent. For example, I keep forgetting how to show an historic version of a file. Take a look at this:
git diff HEAD^ file  # shows differences between previous and current version of file.
This is good. But suppose you just want to see the old file. Look at this:
git show HEAD^ file  # WRONG: prints a blank line. No messages, no warnings.
git show HEAD^:file  # RIGHT: (note colon) shows the previous version of file.
OK. So maybe you should just always use that :? Well, nope—git diff will fail if you add in the colon.