The Pull-Request Workflow
How Teams Actually Work
Professional teams rarely commit straight to main. The standard flow:
- Branch off
main:git switch -c feature-x - Commit your work in small, logical steps
- Push the branch:
git push -u origin feature-x - Open a Pull Request (PR) on GitHub - a request to merge your branch
- Teammates review, CI runs tests, you address feedback
- Merge the PR; delete the branch
Goal: Understand why main is protected: it's the branch that ships to production. PRs are the quality gate - review + automated tests - before anything reaches it.
Tip: Keep PRs small and focused. A 40-line PR gets reviewed in minutes; a 2,000-line PR sits for days and hides bugs. Small branches = fast, safe delivery.
Note: A fork is your own server-side copy of someone else's repo - the model for contributing to open source when you don't have write access. You fork, branch, PR back to the original.