Instruction file imported from benwilcock/rhdh-lab (
.cursor/rules/git-github.mdc). Copyright stays with the author.
Git & GitHub Conventions
Commit Messages
Write clear, detailed commit messages that explain why the change was made, not just what changed.
Format
<short summary in imperative mood, max ~72 chars>
<optional body: explain motivation, context, trade-offs, or anything
non-obvious about the change. Wrap lines at ~72 chars.>
Guidelines
- Use imperative mood: "Add feature" not "Added feature" or "Adds feature"
- First line is a concise summary; add a blank line then a body for anything non-trivial
- Reference related docs or issues when relevant (e.g. "See docs/architecture.md")
- Group related changes into a single commit; separate unrelated changes into distinct commits
Email & Identity
This repository uses a GitHub noreply email to keep the author's personal email private.
- NEVER change
user.emailin git config - NEVER use a personal email address in commits
- The repo-level config is already set; do not override it
Secret Safety
Before every commit:
- Run
git diff --stagedand review for secrets, credentials, personal paths, or tokens - NEVER commit files matching:
.env,*-credentials.yaml,*.pem,*.key - NEVER commit hardcoded passwords, API keys, tokens, or personal absolute paths (e.g.
/Users/...,/home/...) - Use
${ENV_VAR}references for all secrets; set real values only in the gitignored.env - If in doubt, check
.gitignorecovers the file before staging
Submodule: rhdh-local
rhdh-local/is a git submodule tracking the upstream RHDH Local projectmodified: rhdh-local (untracked content)ingit statusis normal -- do not try to fix it- NEVER stage or commit changes inside
rhdh-local/ - To update the submodule:
cd rhdh-local && git checkout main && git pull origin main && cd ..then commit the new SHA in rhdh-lab
Force Push
- NEVER force push to
mainunless the user explicitly requests it - When rewriting history (e.g. email changes, squashing), always use
--force-with-leasefirst; only fall back to--forceif lease fails due to the rewrite itself