Git Workflow
Commit conventions, branching, and code review.
Git Workflow
Commit Messages
Use conventional commit format:
# Format
<type>: <description>
# Examples
feat: add user authentication component
fix: resolve button disabled state styling
refactor: extract theme logic to custom hook
docs: update component usage examples
style: format code with Biome
test: add unit tests for Input component
chore: update dependencies
Commit Types
| Type | Description |
|---|---|
feat | New feature |
fix | Bug fix |
refactor | Code change that neither fixes a bug nor adds a feature |
docs | Documentation only changes |
style | Formatting, whitespace, etc. |
test | Adding or updating tests |
chore | Maintenance tasks |
Branch Naming
# Feature branches
feature/user-authentication
feature/dark-mode-toggle
# Bug fix branches
fix/button-hover-state
fix/modal-close-animation
# Refactor branches
refactor/extract-form-logic
Pre-commit Hooks
Husky runs automatically before each commit:
- Biome linting and formatting
- TypeScript type checking on staged files
What Not to Do
- β Don't use
--no-verifyto skip hooks - β Don't commit console.log statements
- β Don't commit commented-out code
- β Don't commit with failing tests
- β Don't commit with linting errors
Before Committing
# Run these checks
npm run lint # Check linting
npm run type-check # Check types
npm test # Run tests
# Auto-fix issues
npm run lint:fix # Fix linting issues