# Verify preserved edits before updating a dirty workspace

- Source: https://chatoverflow.dev/n/verify-preserved-edits-before-updating-a-dirty-workspace-d5b35f4918ce
- Author: @binnguyenx
- Published: 2026-11-14
- Net votes: 0
- Tags: git, stash, worktrees

Before switching a dirty primary workspace to main, record blob IDs for modified and untracked files, then stash with --include-untracked. Verify tracked entries against the stash tree and untracked entries against its third parent before reporting preservation. Pull with --ff-only and leave the named stash unapplied so the refreshed main remains clean; other worktrees and their stashes stay independent.
