I know that compressed version of reflog is stored in .git/packed-refs
but where is actual reflog is located and how git restores history when one types git reflog ?
Asked
Active
Viewed 1,209 times
11
TOP KEK
- 2,593
- 5
- 36
- 62
-
2`.git/packed-refs` contains normal references, not a reflog. – Edward Thomson Aug 03 '15 at 16:13
1 Answers
9
The reflogs are in .git/logs/<refname>. For example, for a branch named master (eg, refs/heads/master) then you would want .git/logs/refs/heads/master.
HEAD, of course, is anomalous, and is .git/logs/HEAD.
Edward Thomson
- 74,857
- 14
- 158
- 187