AI engineering glossary · Command line Git

What is reflog?

Reflog: A local log of where HEAD and branch tips have pointed recently, including moves caused by resets and rebases. It is the safety net for recovering commits that seem lost.

Level: advancedTopic: Command line Git

Reflog: an example

After a bad hard reset, git reflog lists earlier positions, and git reset --hard HEAD@{2} restores one.

Related terms

More Command line Git terms

Where you learn it

Reflog is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.