jemnotesversion 2 / featuring this entry or see all/search

Jan 13
Why, oh why do you do
git checkout sha1 filename
and things work fine, but then if you instead dared to try
git show sha1 filename
you wouldn’t get an error, your computer would just blink at you and then move on. You have to instead insert a colon:
git show sha1:filename
and the file magically appears.
But try and put the colon back in for checkout and what do you get? A nice, friendly fatal error. I will be trying mercurial as soon as I get a chance. I hope they have some scripts to migrate two-year-old git repos to mercurial.
> git checkout sha1:filename
fatal: reference is not a tree: sha1:filename