mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-11-12 04:54:52 +03:00
350 B
350 B
git rev-parse
Display metadata related to specific revisions. More information: https://git-scm.com/docs/git-rev-parse.
- Get the commit hash of a branch:
git rev-parse {{branch_name}}
- Get the current branch name:
git rev-parse --abbrev-ref {{HEAD}}
- Get the absolute path to the root directory:
git rev-parse --show-toplevel