The Heart of Collaboration
A Pull Request (PR) is how you propose changes to a project. It's a request to "pull" your code into the main codebase. It allows for discussion and review before merging.
The PR Lifecycle
Anatomy of a Great PR
1. Clear Title
"Fix login button alignment" instead of "Fix css".
2. Description
Explain what changed and why. Include screenshots if it's a UI change.
3. Link Issues
Use "Closes #123" to automatically close related issues.
# Example Description
## Summary
Added a dark mode toggle to the settings page.
## Changes
- Created ThemeContext
- Added Toggle component
- Updated global CSS
## Screenshots
[Image attached]
Code Review Etiquette
Be Small
Keep PRs small. Large PRs are hard to review and prone to bugs.
Be Constructive
Reviewers: Ask questions, don't just demand changes. Be kind.
Be Responsive
Authors: Reply to comments and push fixes quickly.
Check Your Understanding
1. What is the correct command to switch to a new branch named 'dev'?
git branch dev
git checkout dev
✓git checkout -b dev
git switch -c dev