git-ls-tree, git-rev-list, git-rev-parse: add pages (#3644)
This commit is contained in:

committed by
Zlatan Vasović

parent
a5f91094dc
commit
a1a3faecb8
16
pages/common/git-rev-parse.md
Normal file
16
pages/common/git-rev-parse.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# 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`
|
Reference in New Issue
Block a user