Discard changes in a file

Discard changes in a file in Git — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
I need to discard local edits in config/settings.py before I start the hotfix so I don’t…
I need to discard local edits in config/settings.py before I start the hotfix so I don’t accidentally commit broken config. Draft the exact sequence I should run, and a short note to Felipe explaining why I reset this file and that his local changes won’t be affected.

Improve — make it easier to accept

+
Before I discard these edits, make it safe and reversible for the team: show me how to stash the…
Before I discard these edits, make it safe and reversible for the team: show me how to stash the current edits with a clear message, how to preview the difference so I’m sure, and how to drop the stash later if we confirm it’s not needed. Explain what to tell the author of the edits so they don’t lose work unexpectedly.

Decide — diagnose the stuck moment

+
I ran a discard on ui/components/menu.js and the author just said they had local work. I’m not sure…

I tried to revert a file and now I’m not sure whether I destroyed someone’s work

I ran a discard on ui/components/menu.js and the author just said they had local work. I’m not sure whether I replaced their file permanently or left a recoverable record. Tell me how to check the reflog or stash for any recoverable versions, the fastest command to restore it if it exists, and what to say to the author while I investigate.

Become — change the pattern

+
My team keeps discarding files to get builds green during emergencies, and we later find valuable…

I habitually discard local edits during pressure and later discover they mattered

My team keeps discarding files to get builds green during emergencies, and we later find valuable tweaks were lost. Propose a team practice to avoid accidental loss: how to record intent before discarding, a minimal staging and stash policy during incidents, and one policy line to add to our incident runbook so nobody overwrites another’s in-flight work.

Next to this one

Other version control work people do in Git.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.