dsh-checkout-guard: Status Precheck Before Writing to the Git Working Directory

`dsh-checkout-guard` is a DSH plugin that checks the Git working tree state before making edits, commits, or pushes, preventing data loss caused by branch mismatches or an incorrect working tree state. It is read-only by default and primarily checks branch identity, divergence from the remote, uncommitted changes, duplicate clones, and commit author identity. After installation, individual checks can be performed with `checkout_guard`, while batch scans can be run with `checkout_guard_scan`; if the state is found to be abnormal, write operations are blocked. It does not automatically fix issues or pull code, but only provides state warnings to ensure that an agent stops operating when the repository state is unclear.

Read More