Table of Contents
- Branching Strategy
- Opening a Pull Request
- Collaborating & Reviewing
- Merging & Cleanup
- References & Resources
Branching Strategy
Isolating work on a dedicated branch prevents conflicts and supports parallel development.| Branch Type | Naming Convention | Purpose |
|---|---|---|
| feature | feature/your-feature | New functionality |
| fix | fix/description | Bug fixes |
| hotfix | hotfix/issue-id | Urgent production fixes |
| release | release/x.y.z | Prep for next version rollout |
Always branch off the latest
main (or develop) to incorporate recent updates and avoid merge conflicts.Opening a Pull Request
When your branch is ready, open a PR to initiate feedback and track changes.- Push your branch to the remote:
- In your repository UI (GitHub/GitLab/Azure Repos), click New Pull Request.
- Fill in:
- Title: concise, descriptive (e.g., “Add JWT-based authentication”)
- Description: summary, related issues, screenshots, test steps
- Assign reviewers, add labels, and select appropriate milestone.
Use templates for consistent PR descriptions: link to the issue, outline changes, list test instructions.
Collaborating & Reviewing
A healthy review process reduces defects and spreads knowledge across the team.- Line-by-line comments
Suggest improvements or ask questions on specific code sections. - Threaded discussions
Resolve design debates without cluttering commit history. - Automated checks
Integrate CI/CD pipelines to run tests, linting, and security scans.
| Review Stage | Action | Tooling Example |
|---|---|---|
| Automated Builds | Validate code compiles and tests pass | GitHub Actions, Jenkins, Azure Pipelines |
| Peer Review | Manual code inspection & feedback | GitHub Reviews, GitLab Approvals |
| Policy Enforcement | Enforce branch protection & sign-offs | Required reviewers, status checks |
Do not merge before all required checks and approvals are completed. Merging early can introduce regressions or untested code into
main.Merging & Cleanup
Once approved and green, it’s time to merge and tidy up.
References & Resources
- GitHub Pull Requests
- GitLab Merge Requests
- Azure Repos PR Overview
- Atlassian Bitbucket Pull Requests