GIT-NAME-REV(1) Git Manual GIT-NAME-REV(1) (NAME) git-name-rev - (SYNOPSIS) git name-rev [--tags] [--refs=] ( --all | --annotate-stdin | ... ) (DESCRIPTION) git rev-parse . (OPTIONS) --tags . --refs= (refs) . (fully qualified) . . --no-refs . --exclude= . . . --refs --refs --exclude . --no-exclude . --all . --annotate-stdin (stdin) SHA-1 ( $hex) "$hex ($rev_name)" . --name-only "$rev_name" $hex . --stdin . : $ cat sample.txt An abbreviated revision 2ae0a9cb82 will not be substituted. The full name after substitution is 2ae0a9cb8298185a94e5998086f380a355dd8907, while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad $ git name-rev --annotate-stdin SHA-1 . --tags "tags/" git-describe . --no-undefined undefined (!= 0) . --always (fallback) . (EXAMPLES) . 33db5f4d9027a10e477ccf054b2c1ab94f74c85a . (context). git name-rev : % git name-rev 33db5f4d9027a10e477ccf054b2c1ab94f74c85a 33db5f4d9027a10e477ccf054b2c1ab94f74c85a tags/v0.99~940 v0.99 . : % git log | git name-rev --annotate-stdin (SEE ALSO) git(1), git-describe(1), git-rev-parse(1) (GIT) git(1) Git 2.55.0 2026-06-29 GIT-NAME-REV(1)