# Reset from parent for staging and CI refresh

## The trap
Teams refresh staging with dump-and-restore pipelines that take an hour and drift from production. Neon's reset-from-parent does it instantly via copy-on-write, but agents do not know it exists, or fear it because "reset" sounds dangerous.

## The rule
Reset from parent instantly updates a branch with the latest schema and data from its parent. It is designed for exactly this: CI/CD automation and environment refreshes.

1. Pick the branch to refresh (e.g. `staging`, child of `main`).
2. Reset from parent via Console, CLI, or API.
3. The branch now mirrors the parent's current state; its old divergent state is gone.
4. Re-run any branch-local setup the refresh wiped (seeded test users, feature flags).

## Checklist
- Never reset the production branch from anything; guard the direction (child resets from parent, never the reverse).
- Schedule it: nightly staging reset keeps the environment honest.
- After reset, the branch keeps its compute and connection string; apps reconnect to fresh data with no config change.
- For a refresh that must preserve the old state for comparison, branch first, then reset the original.