Search notes:

reflog [git]

A reflog (= reference log) logs changes to references such as the tips of branches etc.
They're needed to specify old values of a reference (e.g. HEAD@{10}, master@{one.week.ago} etc., compar with gitrevisions).
Reflogs are found under .git/logs:

Enabling the reflog

The reflog is enabled by setting the option core.logAllRefUpdates.

Expiration

The information stays in the reflogs until they expire.
By default, that is 30 days for unreachable commits and 90 days for reachable commits.
The default can be overwritten with the config options gc.reflogExpireUnreachable and gc.reflogExpire, respectively.

See also

git reflog
Git

Index