FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
I Destroyed a Production Database With One Git Command. Here's What I Learned.
How-ToDevOps

I Destroyed a Production Database With One Git Command. Here's What I Learned.

via Dev.to BeginnersДаниил Корнилов1mo ago

It was 2 AM on a Thursday. I was 17, working on a freelance project for a small e-commerce company. They had about 500 active customers. I was supposed to push a minor CSS fix to staging. Instead, I ran git push --force to the wrong branch. Then I ran the deployment script that was hooked to that branch. Then I watched in horror as the migration script -- one I had been testing locally with destructive resets -- ran against the production database. 1,247 customer records. Gone. This is the story of the worst night of my coding life and everything I learned from it. How It Happened Let me set the scene. I was working on two branches: feature/checkout-redesign -- a big feature branch with database migrations hotfix/button-color -- a tiny CSS fix I had been doing git rebase on the feature branch to keep it clean. The rebase required a force push. Normal stuff. But I had the wrong branch checked out. Here's what I typed: git push --force origin main I meant to type: git push --force origin

Continue reading on Dev.to Beginners

Opens in a new tab

Read Full Article
34 views

Related Articles

CA 12 - Next Permutation
How-To

CA 12 - Next Permutation

Dev.to • 1w ago

How to Back Up Your Android Phone (2026)
How-To

How to Back Up Your Android Phone (2026)

Wired • 1w ago

Mining the deep ocean
How-To

Mining the deep ocean

Ars Technica • 1w ago

CA 08 - Sort 0s, 1s, and 2s
How-To

CA 08 - Sort 0s, 1s, and 2s

Dev.to • 1w ago

PDF to LaTeX Conversion: Why It's Hard and What Actually Works
How-To

PDF to LaTeX Conversion: Why It's Hard and What Actually Works

Dev.to Tutorial • 1w ago

Discover More Articles