diff --git a/modules/home/ai-agent/skills/using-jujutsu/SKILL.md b/modules/home/ai-agent/skills/using-jujutsu/SKILL.md index 637816c..1791189 100644 --- a/modules/home/ai-agent/skills/using-jujutsu/SKILL.md +++ b/modules/home/ai-agent/skills/using-jujutsu/SKILL.md @@ -94,6 +94,22 @@ Do not use `jj resolve` — it launches an interactive merge tool. Edit the conf **Editing an existing commit:** use `jj edit ` to check it out, then make changes directly. The commit updates in place — no need to squash. +## Commit Early, Squash Later + +Make small, atomic commits as you go -- especially after the project builds or a logical step is complete. These act as checkpoints you can return to if something breaks. Don't wait until the end to commit everything at once. + +```bash +# after a logical step builds successfully, start a new commit for the next step +jj new -m "extract parser into separate module" +# make changes... +``` + +At the end, squash related commits together if they make more sense as one: + +```bash +jj squash --into -m "description" +``` + ## Commit Quality After writing code, review each commit and refine it: