Pull Requests (PRs) are used to recommend the merging of code from one branch into a different branch. PRs are a core tool in open-source software development as it allows developers to propose changes to large, open-source codebases.
After reviewing, if the changes are approved by author(s)/collaborators of the repository, they are merged into the base branch (this is usually named the
main branch). If they do not, then they may either ask the requester for additional changes or decline the PR altogether.
Create a Pull Request
The prerequisites for creating a PR and contributing to are:
- Fork the project.
- Clone the forked repository to local machine.
- Create, and switch into, a new branch.
- Add, commit, and push the changes back to repository.
With the newly added changes pushed, open the web page of the repository. There should be a button that says “Create Pull Request” placed somewhere, similar to the image below.
Click that button and follow the steps to create the PR.