From 0c467a43ef18159bfcd748f00c07a60b97780f26 Mon Sep 17 00:00:00 2001 From: Shayan Rais Date: Sat, 4 Apr 2026 18:34:06 +0500 Subject: [PATCH] =?UTF-8?q?add=20git=20commit=20rules=20section=20?= =?UTF-8?q?=E2=80=94=20enforce=20one=20commit=20per=20file=20for=20cleaner?= =?UTF-8?q?=20history?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- CLAUDE.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 9b3ee3f..d56ce1c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -106,6 +106,17 @@ From experience with this repository: - Use browser automation MCPs (Claude in Chrome, Playwright, Chrome DevTools) for Claude to inspect console logs - Provide screenshots when reporting visual issues +## Git Commit Rules + +When committing changes, **create separate commits per file**. Do NOT bundle multiple file changes into a single commit. Each file gets its own commit with a descriptive message specific to that file's changes. + +For example, if `README.md`, `best-practice/claude-subagents.md`, and a skill file all changed: +- Commit 1: `git add README.md` → commit with README-specific message +- Commit 2: `git add best-practice/claude-subagents.md` → commit with subagents-doc-specific message +- Commit 3: `git add .claude/skills/weather-fetcher/SKILL.md` → commit with skill-specific message + +This makes the git history cleaner and easier to review, revert, or cherry-pick individual changes. + ## Documentation See `.claude/rules/markdown-docs.md` for documentation standards. Key docs: