Never Feed Git After Midnight
First of all, keep him out of the light, he hates bright light, especially sunlight, it'll kill him. Second, don't give him any water, not even to drink. But the most important rule, the rule you can never forget, no matter how much he cries, no matter how much he begs, never feed him after midnight.
— Gremlins (1984)
git reflog
1 patiently waiting for its next victim.
There's something almost mystical about typing in the shroud of night. No Slack notifications. No meetings throwing off your flow. Just you, the glow of your screen, and the code.
After a day of bouncing between distractions and making minimal progress, this feels like your moment to finally get something meaningful done.
My fingers fly across the keyboard with purpose.
Eventually, I slam my laptop shut and collapse into bed, eyes twitching from a toxic mix of stress, anxiety, and that coder's high you get after a hackathon. I drift off, ready for my consciousness to ragdoll to a fresh new day.
Then I wake up... and it hits me all over again when I see the steaming pile of digital garbage I cooked up the night before. "Let me cook"? More like revoke my kitchen privileges. WTF did I even write? Do I even know what a variable is?
After experiencing this pattern more times than I care to admit, I made a solemn promise to myself: no coding after midnight—or at the very least, no committing anything until I've reviewed it with fresh eyes the next day.
Even when I'm not actively writing code but just troubleshooting—stuck on an annoyingly elusive bug or trying to grasp some complex logic—it's the same trap. I'll spend hours adding logs, hitting breakpoints, and alt-tabbing between docs and my editor, only to spiral deeper into frustration.
Then I go to sleep marinating in that frustration, only to wake up and immediately grasp what took me hours of late-night struggle to fail at understanding. Five minutes of morning clarity beats five hours of midnight madness every time.
Late-night coding feels heroic in the moment—you're in a 1v1 against the compiler while the rest of the world sleeps. But this is not the way.
So I've learned my lesson:
Never feed git
after midnight.
You won't like what it turns into.
And unlike Gremlins, you can't just toss your spaghetti monster code into direct sunlight to make it disappear.
You'll have to refactor it yourself—in the harsh daylight of tomorrow's code review.
-
Utility that keeps a record of all reference updates in your Git repository. ↩