From: Kai Moritz Date: Sat, 23 May 2026 07:59:19 +0000 (+0000) Subject: CLAUDE.md: MOVE/ALIGN-Commit-Konvention dokumentiert X-Git-Tag: scripting--2026-06-04~65 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=b8685acd7274d026a88aa176ce0948d01ceadf14;p=demos%2Fkafka%2Ftraining CLAUDE.md: MOVE/ALIGN-Commit-Konvention dokumentiert Co-Authored-By: Claude Sonnet 4.6 --- diff --git a/CLAUDE.md b/CLAUDE.md index 77ddfe24..9c1eb4f1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -134,6 +134,19 @@ Always return to `scripting` after bulk operations — scripts `git checkout scr 4. Run `./REBASE.sh` to verify the chain is consistent. 5. Run `./PUSH.sh` to publish. +## Commit Conventions + +### MOVE / ALIGN Split + +When a class or file is moved to a new branch (or a new spin-off is created from an existing class), the change is always split into exactly two commits: + +- **`... -- MOVE`** (or **`... -- ADD`**): copies/moves the file **completely unchanged** — the content must be 100% identical to the source. This allows git to correctly detect and track file history across branches. +- **`... -- ALIGN`**: contains **all the actual changes** needed to adapt the file for its new context (e.g. renaming the class, changing the main class in build files, adjusting behaviour). + +**When rebasing**, always verify that `-- MOVE` / `-- ADD` commits do not inadvertently introduce changes (they must remain 100% copies). If a rebase causes a `-- MOVE` commit to include modifications, correct this before continuing. + +**When resolving conflicts in `-- ALIGN` commits**, the intent of the ALIGN is to make targeted changes on top of the MOVE. Resolve conflicts by preserving the ALIGN's intended changes (e.g. class renaming, build-file adjustments) while discarding any content that was made obsolete by earlier improvements (e.g. removed Dockerfile-related plugins in pom.xml that no longer apply after the Jib migration). + ## Manual Rebasing Workflow The `REBASE.sh` script automates rebasing in principle, but in practice conflicts arise frequently because branches intentionally differ — they demonstrate different aspects of Kafka. Claude Code takes over the role of the human who previously had to intervene manually.