1. Branching Strategy
To keep the codebase clean, organized, and collaboration-friendly, follow feature-wise branching using this format:
<type>/<short-description>
Types:
- feature — for new feature
- fix — for bug fixes
- hotfix — for urgent production fixes
- refactor — for major code restructuring
- chore — for maintenance or config updates
📝 Example Branch Names:
- feature/login-ui
- fix/header-crash
- refactor/dashboard-layout
Always create a new branch off of main before starting work.Use meaningful names that indicate the purpose of the branch.
2. Commit Message Format
Follow this consistent structure for your commit messages:
<type>: <short and clear description>
Commit Types:
- feat: — for adding a new feature
- fix: — for fixing bugs
- chore: — for maintenance or config updates
- refactor: — for structural code changes
- docs: — for updating documentation
📝 Example Commits:
- feat: add login page UI
- fix: resolve crash on header click
- refactor: restructure dashboard component logic
- chore: update dependencies
- docs: add API usage instructions
❗Avoid vague commits like:
- update, changes, final commit, etc.
3. Pull Request Process
Once your work is done:
- Push your branch to GitHub:git push origin feature/your-branch
- Pull the latest changes from main before raising a PR and if any conflicts are fixed before PR.git pull origin main (in your feature branch)
- Create a Pull Request (PR) into main.
PR Title format:<type>: <summary>
Example: feat: add OTP verification flow
- Request review from relevant team leads.
- Resolve any feedback and ensure all checks pass.
- Merge only after approval. Never push directly to main.
4. Quick Reminders
- Keep PRs small and focused on one thing.
- Communicate with your team — don't wait till the last minute.
- Write descriptive commit messages and PR descriptions.