Squash merge completed feature branch to main with proper commit message.
Commit Format
| Type | Format |
|---|---|
| Feature | As a [role] I [action] so that [benefit] |
| Fix | Fix: [description] |
| Refactor | Refactor: [description] |
| Style | Style: [description] |
Rules
- •ALWAYS include
Closes #XXon separate line when resolving issues - •NEVER include "Co-Authored-By: Claude"
- •Use detailed commit body for complex changes
- •Do NOT push (user will push manually)
Examples
code
Fix: Return proper error message for unauthorized AJAX requests Closes #123 - Changed empty array response to include 'Authorization required' message - Updated error handling middleware
code
As a student I can see my learning outcomes Closes #80
Pre-Merge Checklist
- • Tests pass locally
- • No linting/type errors
- • No
console.logstatements left in code - • No commented-out code
- • Environment variables documented in
.env.example - • Database migrations tested (if applicable)
- • API changes documented (if applicable)
Process
- •Verify pre-merge checklist
- •Run
git log main..HEADto see all branch commits - •Run
git diff main...HEADto see total changes - •Check staged files - unstage any files unrelated to this merge
- •Checkout main:
git checkout main - •Squash merge:
git merge --squash <branch-name> - •Commit with HEREDOC:
bash
git commit -m "$(cat <<'EOF' Commit message here. Closes #XX EOF )"