snippetbashTip
git reflog — Show a log of changes to local references like HEAD, branches, or tags. More information: <https://g
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 reflogShow the reflog for a given branch:
git reflog {{branch_name}}Show only the 5 latest entries in the reflog:
git reflog {{[-n|--max-count]}} 5Code Snippets
Show the reflog for `HEAD`
git reflogShow the reflog for a given branch
git reflog {{branch_name}}Show only the 5 latest entries in the reflog
git reflog {{[-n|--max-count]}} 5Context
tldr-pages: common/git reflog
Revisions (0)
No revisions yet.