| name | refreshing-history |
| description | Refresh a default branch to one signed initial commit: update deps, verify, force-push with backup. |
refreshing-history
Resets the default branch to a single signed commit, with deps freshly resolved and code freshly formatted. Works entirely in a sibling worktree; pushes a remote backup ref before any destructive action.
When to use
- Cutting a clean baseline before a major release.
- Coordinated fleet-wide history reset (run per-repo).
- A repo's history is a graveyard of WIP / squash-merge artifacts and the team has agreed to start fresh.
Not for: dropping unwanted commits surgically (use git rebase -i), or covering up bad PR hygiene.
Boundary with squashing-history
squashing-history is the lower-level "squash to 1 commit" primitive. This skill layers on dep refresh + signed commit + integrity check + force-push contract. The org's required_signatures branch protection mandates git commit-tree -S — the bare config flag is unreliable for plumbing commands.
Run
node .claude/skills/fleet/refreshing-history/run.mts /path/to/<repo>
The runner walks 10 phases end-to-end. See run.mts for the implementation.
| # | Phase | What it does |
|---|
| 1 | Pre-flight | Resolve default branch (main → master fallback); fetch; capture ORIG_HEAD and ORIG_COUNT. |
| 2 | Worktree |