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

git reflog — Show a log of changes to local references like HEAD, branches, or tags. More information: <https://g

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandlocalgit reflogshowlogclichangesreferences

Problem

How to use the git reflog command: Show a log of changes to local references like HEAD, branches, or tags. More information: <https://git-scm.com/docs/git-reflog>.

Solution

git reflog — Show a log of changes to local references like HEAD, branches, or tags. More information: <https://git-scm.com/docs/git-reflog>.

Show the reflog for HEAD:
git reflog


Show the reflog for a given branch:
git reflog {{branch_name}}


Show only the 5 latest entries in the reflog:
git reflog {{[-n|--max-count]}} 5

Code Snippets

Show the reflog for `HEAD`

git reflog

Show the reflog for a given branch

git reflog {{branch_name}}

Show only the 5 latest entries in the reflog

git reflog {{[-n|--max-count]}} 5

Context

tldr-pages: common/git reflog

Revisions (0)

No revisions yet.