Examples (3)
Get the commit hash of a branch
git rev-parse branch_nameGet the current branch name
git rev-parse --abbrev-ref HEADGet the absolute path to the root directory
git rev-parse --show-toplevelmade by @shridhargupta | data from tldr-pages