Where does git store its reflog?

I know that the compressed version of reflog is stored in .git/packed-refs but where is the actual reflog located and how does git restore history when there is one type of git reflog ?

+5
source share
1 answer

Reflogs are in .git/logs/<refname> . For example, for a branch named master (e.g. refs/heads/master ) you need .git/logs/refs/heads/master .

HEAD , of course, is abnormal and .git/logs/HEAD .

+5
source

All Articles