![Forrest logo](/images/logo.png)
git-show-ref:tldr:964b8
The command "git show-ref" is used in git version control to display references (branches, tags, and other references) along with their corresponding commit hashes.
When you run this command, Git will list all the references stored in the repository, including local and remote branches, tags, and other references. Each reference is displayed as a line with its full commit hash followed by a space and then the reference's name.
For example, the output of "git show-ref" could look like this:
712f3c4bcf44c49e0a4cd38d24f6e8a32c9d94f0 refs/heads/master bab45d880b2f1bc7078c4435920d1fb617dd81f2 refs/heads/feature1 b3a38b1dd57c7f90da13011d95db5c77765d8409 refs/tags/v1.0
In this example, three references are shown: "master" pointing to commit 712f3c4bcf44c49e0a4cd38d24f6e8a32c9d94f0, "feature1" pointing to commit bab45d880b2f1bc7078c4435920d1fb617dd81f2, and "v1.0" tag pointing to commit b3a38b1dd57c7f90da13011d95db5c77765d8409.
This command is often used to get a quick overview of all the references in a repository. It can be helpful for inspecting and managing branches, tags, and other references.