HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

git show-ref — Git command for listing references. More information: <https://git-scm.com/docs/git-show-ref>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandgit show-refclilistingforreferencesgit

Problem

How to use the git show-ref command: Git command for listing references. More information: <https://git-scm.com/docs/git-show-ref>.

Solution

git show-ref — Git command for listing references. More information: <https://git-scm.com/docs/git-show-ref>.

Show all refs in the repository:
git show-ref


Show only heads references:
git show-ref --branches


Show only tags references:
git show-ref --tags


Verify that a given reference exists:
git show-ref --verify {{path/to/ref}}

Code Snippets

Show all refs in the repository

git show-ref

Show only heads references

git show-ref --branches

Show only tags references

git show-ref --tags

Verify that a given reference exists

git show-ref --verify {{path/to/ref}}

Context

tldr-pages: common/git show-ref

Revisions (0)

No revisions yet.