Proposing Changes for Review
Pull requests (PRs) are how you propose changes, get feedback, and collaborate with teams on GitHub.
Creating a Pull Request
- Push your branch:
git push origin feature-branch - Go to the repository on GitHub
- Click "Compare & pull request"
- Add title and description
- Select reviewers (if on a team)
- Click "Create pull request"
PR Description Best Practices
- Explain what changed and why
- Link to relevant issues
- Include screenshots for UI changes
- Mention testing performed
- Note breaking changes
Example Description
## Changes
- Add real-time sensor monitoring
- Implement automatic alerts for anomalies
## Why
Closes #42 - Need real-time visibility into sensor data
## Testing
- Tested with 1000+ data points
- Verified alerts trigger correctly
- Checked performance impact (minimal)
## Screenshots
[Include screenshots here]
Code Review Process
- Reviewers examine code
- Leave comments and suggestions
- Author addresses feedback
- Push additional commits to same branch
- Once approved, merge
Responding to Feedback
- Make requested changes
- Commit and push (PR updates automatically)
- Reply to comments
- Mark conversations as resolved
Merging Pull Requests
Three merge options:
- Merge commit: Preserves all commits
- Squash and merge: Combines into one commit
- Rebase and merge: Linear history
Draft PRs
Mark PR as draft for early feedback without formal review.
PR Etiquette
- Keep PRs focused and small
- Respond promptly to reviews
- Be respectful in discussions
- Thank reviewers
- Test before requesting review
Next: Cockpit Integration
You've mastered pull requests. Next, learn to use Git within VS Code for a streamlined workflow.