Skip to content

zdev cleanup

Remove development records that were tracked only for a pull request. The squash subcommand deletes tracked .zdev files in a dedicated commit so they are absent from the eventual squash merge.

Create the cleanup commit:

Terminal window
zdev cleanup squash

Or request a structured result from the same operation:

Terminal window
zdev cleanup squash --format json
zdev cleanup squash

Cleanup requires the pull-request record policy, a checked-out non-trunk branch with at least one commit, a clean index and worktree, and no Git operation in progress. It creates a plain Git commit; it does not perform the squash merge.

If the commit fails, the deletions remain staged so you can inspect and recover them. See record policies and the user guide.