]> juplo.de Git - demos/kafka/training/commitdiff
CLAUDE.md: MOVE/ALIGN-Commit-Konvention dokumentiert
authorKai Moritz <kai.milan.moritz@googlemail.com>
Sat, 23 May 2026 07:59:19 +0000 (07:59 +0000)
committerKai Moritz <kai.milan.moritz@googlemail.com>
Sat, 23 May 2026 07:59:19 +0000 (07:59 +0000)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CLAUDE.md

index 77ddfe2485b2efed0a22630198ba0ce428427ffe..9c1eb4f1cdaa61926426ec0e5272498f284bcdd2 100644 (file)
--- 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.