From 8fcc5b24bf66d31b35bb2456daee7680efdc93d5 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Tue, 24 Feb 2026 02:10:03 +0000 Subject: [PATCH] using-jujutsu: add commit-early-squash-later guidance --- .../home/ai-agent/skills/using-jujutsu/SKILL.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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: -- 2.51.2