From 521acc718c0d3e8c59c5d328e50b92f87669f710 Mon Sep 17 00:00:00 2001 From: Frederic Cabassut Date: Mon, 7 Sep 2026 19:09:05 +0200 Subject: [PATCH] docs: require all work to happen in a dedicated worktree Co-Authored-By: Claude Fable 5.1 --- CLAUDE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 2eae25a..f08dbb8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -171,7 +171,8 @@ A `Makefile` wraps all common tasks for tool-agnostic usage. Run `make help` to - **Conventional commits**: Use `feat:`, `fix:`, `chore:`, `docs:`, `refactor:`, `test:` prefixes - **Commit regularly**: Bundle related changes into logical commits after each step or feature slice — don't accumulate a large diff - **Main branch**: `main` — use as base for all PRs and feature branches -- **Feature branches**: Use `feat/` branches with worktrees for isolation +- **Always work in a worktree**: Never edit files in the main checkout. Before touching any file, create a dedicated worktree (`EnterWorktree` or `git worktree add .worktrees/ -b `) on a fresh branch from `origin/main`, do all work, commits, and PR creation from there. This keeps the main checkout clean and lets several tasks run side by side without clobbering each other's uncommitted changes. +- **Feature branches**: Use `feat/` (or `fix/`) branches, one per worktree - **Rebase before PR**: Always `git rebase origin/main` (not merge) before pushing or creating a PR to keep a clean linear history and avoid merge conflicts in the PR ## CI/CD