--- name: git-best-practices description: | Git best practices for commit messages and branch workflow. Use when: - Writing, reviewing, or advising on a git commit message - Advising on branching strategy, merging, or rebasing - Setting up or explaining a team Git workflow - Preparing or reviewing a pull request - Resolving or advising how to avoid merge conflicts - Any task involving git history, linear history, or PR hygiene --- # Git Best Practices Two core areas: 1. **Commit messages** — how to write clear, meaningful commit messages 2. **Branch workflow** — how to keep a clean, linear history using rebase Read the relevant reference file(s) before advising. ## References - **[references/commit-messages.md](references/commit-messages.md)** — The 7 rules for great commit messages. Read when writing, reviewing, or advising on commit messages. - **[references/git-workflow.md](references/git-workflow.md)** — Rebase-first branch workflow for clean history. Read when advising on branching strategy, PRs, merging, or conflict resolution.