[{"data":1,"prerenderedAt":176},["ShallowReactive",2],{"term-r\u002Freflog":3,"related-r\u002Freflog":161},{"id":4,"title":5,"acronym":6,"body":7,"category":142,"description":143,"difficulty":144,"extension":145,"letter":146,"meta":147,"navigation":148,"path":149,"related":150,"seo":155,"sitemap":156,"stem":159,"subcategory":6,"__hash__":160},"terms\u002Fterms\u002Fr\u002Freflog.md","Reflog",null,{"type":8,"value":9,"toc":136},"minimark",[10,15,19,23,26,30,125,129,132],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 - The Vibe Check",[16,17,18],"p",{},"Git's reflog is the secret undo history that survives even after you think you've deleted something forever. Force-pushed over your only copy of three days of work? Reset hard onto the wrong commit? Reflog remembers every place HEAD has pointed, even the erased-looking ones, for weeks. It's the check-the-recycling-bin-before-you-panic move.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"The reflog is a local, per-repository log of every update to HEAD and branch refs, including commits that become unreachable from any branch after a reset, rebase, or force-push. It is never shared via push or pull and entries expire on a timer (90 days by default for reachable ones, 30 for unreachable ones), but within that window it can recover almost any lost commit via git reflog followed by git reset or git cherry-pick.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","$ git reflog\na1b2c3d HEAD@{0}: reset: moving to HEAD~3\ne4f5g6h HEAD@{1}: commit: fix auth bug\n$ git reset --hard e4f5g6h\n","bash","",[38,39,40,56,84,109],"code",{"__ignoreMap":36},[41,42,45,49,53],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sBMFI","$",[41,50,52],{"class":51},"sfazB"," git",[41,54,55],{"class":51}," reflog\n",[41,57,59,62,65,69,72,75,78,81],{"class":43,"line":58},2,[41,60,61],{"class":47},"a1b2c3d",[41,63,64],{"class":51}," HEAD@{",[41,66,68],{"class":67},"sbssI","0",[41,70,71],{"class":51},"}:",[41,73,74],{"class":51}," reset:",[41,76,77],{"class":51}," moving",[41,79,80],{"class":51}," to",[41,82,83],{"class":51}," HEAD~3\n",[41,85,87,90,92,95,97,100,103,106],{"class":43,"line":86},3,[41,88,89],{"class":47},"e4f5g6h",[41,91,64],{"class":51},[41,93,94],{"class":67},"1",[41,96,71],{"class":51},[41,98,99],{"class":51}," commit:",[41,101,102],{"class":51}," fix",[41,104,105],{"class":51}," auth",[41,107,108],{"class":51}," bug\n",[41,110,112,114,116,119,122],{"class":43,"line":111},4,[41,113,48],{"class":47},[41,115,52],{"class":51},[41,117,118],{"class":51}," reset",[41,120,121],{"class":51}," --hard",[41,123,124],{"class":51}," e4f5g6h\n",[11,126,128],{"id":127},"when-youll-hear-this","When You'll Hear This",[16,130,131],{},"\"I force-pushed over my branch, but the reflog still has it.\" \u002F \"Check the reflog before you assume the commit is gone forever.\"",[133,134,135],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":58,"depth":58,"links":137},[138,139,140,141],{"id":13,"depth":58,"text":14},{"id":21,"depth":58,"text":22},{"id":28,"depth":58,"text":29},{"id":127,"depth":58,"text":128},"git","Git's reflog is the secret undo history that survives even after you think you've deleted something forever.","intermediate","md","r",{},true,"\u002Fterms\u002Fr\u002Freflog",[151,152,153,154],"Reset","Rebase","Detached HEAD","Git Bisect",{"title":5,"description":143},{"changefreq":157,"priority":158},"weekly",0.7,"terms\u002Fr\u002Freflog","wbcKjs7u57E1OEfD-AOH2w8UbpjeUfbgMksr_IvIaVM",[162,166,169,173],{"title":153,"path":163,"acronym":6,"category":142,"difficulty":164,"description":165},"\u002Fterms\u002Fd\u002Fdetached-head","beginner","Detached HEAD is the state you end up in when you check out a specific commit instead of a branch, and git politely warns you that anything you commit here...",{"title":154,"path":167,"acronym":6,"category":142,"difficulty":144,"description":168},"\u002Fterms\u002Fg\u002Fgit-bisect","Git bisect is a binary search for bugs.",{"title":152,"path":170,"acronym":6,"category":142,"difficulty":171,"description":172},"\u002Fterms\u002Fr\u002Frebase","advanced","Rebase is like rewriting history.",{"title":151,"path":174,"acronym":6,"category":142,"difficulty":171,"description":175},"\u002Fterms\u002Fr\u002Freset","Reset is like pressing undo on your commits.",1792528116380]