Forking Workflow
You'll learn: How open-source projects use forking to let anyone contribute without granting direct write access to the main repository.
What Is the Forking Workflow?
In the Forking Workflow, contributors don't work directly in the project's main repository. Instead, each contributor creates their own fork—a complete server-side copy of the repository under their own account. They make changes in their fork, then submit those changes back to the original project via a pull request.
This workflow is dominant in open-source projects because it allows maintainers to control what gets merged while enabling anyone to propose changes without needing special permissions.
How It Works
- Fork the repository: A contributor copies the main project repository to their own GitHub (or GitLab, etc.) account.
- Clone their fork: They clone their fork to their local machine.
- Create a feature branch: Work happens on a branch in their fork.
- Commit and push: Changes go to the contributor's fork, not the original repository.
- Submit a pull request: The contributor requests that maintainers review and merge their changes from their fork into the main project.
- Review and merge: Maintainers review the pull request, discuss changes, and merge if acceptable.
Why It Matters
This model scales beautifully: thousands of contributors can work independently without cluttering the main repository with branches or requiring administrative overhead. Maintainers retain full control, while contributors have complete freedom to experiment in their own space.
Analogy: Think of the main repository as a published cookbook. Anyone can photocopy it (fork), write their own recipe variations at home (their fork), then mail their new recipe to the publisher (pull request) for consideration in the next edition.
Key Takeaway:
The Forking Workflow allows open collaboration at scale by giving every contributor their own repository copy, with pull requests as the gateway back to the main project.