Skip to content

feat(tidy-commits): add commit-history tidying skill#17

Merged
akunzai merged 1 commit into
mainfrom
feat/commit-stack-curator-skill
Jun 4, 2026
Merged

feat(tidy-commits): add commit-history tidying skill#17
akunzai merged 1 commit into
mainfrom
feat/commit-stack-curator-skill

Conversation

@akunzai

@akunzai akunzai commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the tidy-commits skill: a guide for tidying a local branch's commit history into a clear, reviewable story before review or merge — squash fixups, reword, reorder, split, or drop commits while preserving the intended final tree.

Highlights:

  • Preflight + backup: determine base, fetch, require a clean state, record current state, create a backup ref before any rewrite.
  • Cleanup plan: a classification table mapping each commit type to a default action.
  • Non-interactive rewrite: reset --soft <base> shortcut for collapse-all, plus the GIT_SEQUENCE_EDITOR todo flow (generated oldest-first via git log --reverse) for selective fixup/reorder/split, with recovery steps.
  • Stacked branches: --update-refs by default; flag refs checked out in other worktrees.
  • Verification: prove the final tree matches the backup; signature handling for protected branches.
  • Push safety: never plain --force; --force-with-lease only, with confirmation.

Includes a content test (tests/tidy-commits-content.sh) and a CI workflow (.github/workflows/test-tidy-commits.yml), plus a README entry.

Test plan

  • bash tests/tidy-commits-content.sh passes (12 content assertions)
  • CI workflow runs the same check on push/PR to main

Add a skill that tidies a local branch's commit history into a clear, reviewable story before review or merge — squash fixups, reword, reorder, split, or drop while preserving the final tree. Covers preflight + backup ref, non-interactive rebase with todo generation and recovery, stacked-branch --update-refs, signature handling, and force-with-lease push safety. Adds a content test and CI workflow.
@akunzai akunzai merged commit d0550e0 into main Jun 4, 2026
5 checks passed
@akunzai akunzai deleted the feat/commit-stack-curator-skill branch June 4, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant