From 3e1bcd90b24156cd015df599f6fbbb9a1c438a34 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Thu, 5 Mar 2026 08:43:24 +0100 Subject: [PATCH] chore(docs): add git command chaining rule to CLAUDE.md Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CLAUDE.md b/CLAUDE.md index 708a170b0..129576dce 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -35,6 +35,7 @@ This project uses **git worktrees** in a shared parent directory (`settled-reach - All file paths are relative to the worktree root (e.g. `server/src/bridge/types.rs`). - Do not navigate to or access sibling worktrees (`../client/`, `../copy/`, etc.) unless explicitly instructed. - **Exception — stale git lock files:** Worktree index locks live in the shared `.git` directory (e.g. `main/.git/worktrees/copy/index.lock`). If a `git` command fails with `index.lock: File exists`, you may remove the lock file for **your own worktree only**. Never touch lock files belonging to other worktrees. +- **Never chain git commands** in a single Bash call (e.g. `git add ... && git commit ...`). The shared `.git` directory means concurrent index access from the same terminal creates `index.lock` collisions. Always run `git add` and `git commit` as **separate sequential Bash calls**. ### Database