commands.sh

git reflog

all

Show a log of changes to local references like HEAD, branches, or tags.

More info →

Options (1)

-n, --max-countboolean

Show only the 5 latest entries in the reflog

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

Examples (3)

Show the reflog for `HEAD`

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
made by @shridhargupta | data from tldr-pages