Skip Navigation

Every engineer should understand git reflog

graphite.dev Every engineer should understand git reflog

s a software engineer, you’ve probably wondered how Git’s reflog works under the hood. That’s where this guide comes in.

Every engineer should understand git reflog
4

You're viewing a single thread.

4 comments
  • One thing that is not made clear in the article, is that there is a separate reflog for HEAD, and separate reflogs for individual branches.

    HEAD reflog logs changes such as "checkout: moving from next to main". Branch reflog logs changes such as "branch: Created from HEAD" (first entry in branch reflog). Most are common to both (i.e. git logs both to HEAD reflog and the reflog of currently checked out branch).