Git Workflow
We follow a feature branch workflow with pull request reviews before merging to the main branch.Branch Naming Convention
Use descriptive branch names that follow this pattern:feature/- New features or enhancementsfix/- Bug fixeshotfix/- Urgent production fixesrefactor/- Code refactoringdocs/- Documentation updatestest/- Test additions or modifications
Development Process
1
Create a New Branch
Always branch from the latest
main branch:2
Make Your Changes
Develop your feature with frequent, atomic commits:
3
Keep Branch Updated
Regularly sync your branch with main to avoid conflicts:
4
Run Tests and Linting
Ensure all checks pass before pushing:
5
Push Your Branch
Push your branch to the remote repository:
6
Create a Pull Request
Open a pull request on GitHub/GitLab with a descriptive title and description.
Commit Message Convention
We use Conventional Commits for clear and consistent commit history.Format
Types
feat- A new featurefix- A bug fixdocs- Documentation changesstyle- Code style changes (formatting, semicolons, etc.)refactor- Code refactoring without changing functionalityperf- Performance improvementstest- Adding or updating testschore- Maintenance tasks, dependencies, build processci- CI/CD configuration changes
Examples
Breaking Changes
Breaking Changes
When introducing breaking changes, add
BREAKING CHANGE: in the footer:Pull Request Guidelines
PR Title
Use the same convention as commit messages:PR Description Template
Provide comprehensive context in your PR description:PR Size Guidelines
Ideal PR sizes:- Small: < 200 lines changed
- Medium: 200-400 lines changed
- Large: 400-800 lines changed
- Too Large: > 800 lines (consider breaking it up)
Code Review Process
For Authors
1
Self-Review First
Review your own PR before requesting reviews. Check for:
- Code quality and readability
- Unnecessary console logs or debug code
- Proper error handling
- Test coverage
2
Request Reviews
Assign appropriate reviewers based on the changes:
- At least one senior developer
- Domain experts if touching critical areas
3
Address Feedback
Respond to all comments and make requested changes:
4
Resolve Conversations
Mark conversations as resolved once addressed.
For Reviewers
Provide constructive, actionable feedback: Good feedback:Review Checklist
- Code is clear and maintainable
- No unnecessary complexity
- Proper error handling
- Security considerations addressed
- Performance implications considered
- Tests are comprehensive
- Documentation is updated
- No hardcoded values or secrets
- Accessibility standards met
- Browser compatibility considered
Continuous Integration
All PRs must pass CI checks before merging:Automated Checks
Merging Strategy
We use squash and merge for most PRs to keep the main branch history clean.When to Use Each Strategy
Squash and Merge (Default)
Squash and Merge (Default)
Use for feature branches with multiple commits:
Rebase and Merge
Rebase and Merge
Use when commits are already well-organized and atomic:
Merge Commit
Merge Commit
Rarely used, only for combining long-lived branches:
Conflict Resolution
When encountering merge conflicts:1
Update Your Branch
2
Resolve Conflicts
Open conflicted files and resolve markers:Choose the correct resolution:
3
Continue Rebase
4
Force Push
Release Process
For production releases:- Create a release branch from main
- Update version numbers and changelog
- Create a release PR
- After approval, merge and tag the release
- Deploy to production