I can use git show rev:path/to/file
to output the a file as it was in
rev
, and I would like a rev
that points at the staging area. For example:
git show HEAD:myfile > myfile.local
will cat myfile as it is in the checked-out commit.git show MERGE_HEAD:myfile > myfile.other
will cat myfile as it is in the donating branch during a merge.git show XXX:myfile > myfile.staged
will cat myfile as it is in the staging area.
My question refers to the last bullet point: is there a symbolic ref XXX that refers to the staged version, or is there no such ref?
(FWIW: I have not found anything in git help revisions
, git help show
, on Stack Overflow, or via search engines. I'd like to get some corroboration, though, before I conclude something so obviously useful doesn't exist (and that I must propose it on Git's mailing list). Many thanks in advance!)