Asked by: Soralla Hollermeierasked in category: General Last Updated: 28th January, 2020
How do you write a pull request?
- Familiarize yourself with the context of the issue, and reasons why this Pull Request exists.
- If you disagree strongly, consider giving it a few minutes before responding; think before you react.
- Ask, don't tell.
- Explain your reasons why code should be changed.
- Offer ways to simplify or improve code.
Just so, how do I do a pull request?
In summary, if you want to contribute to a project, the simplest way is to:
- Find a project you want to contribute to.
- Fork it.
- Clone it to your local system.
- Make a new branch.
- Make your changes.
- Push it back to your repo.
- Click the Compare & pull request button.
- Click Create pull request to open a new pull request.
Subsequently, question is, how long should a pull request take? As we can see from the chart above, pull requests with more than 250 lines of changes tend to take more than 1 hour to be reviewed.
Hereof, how do I write a pull request review?
Approving a pull request with required reviews
- Under your repository name, click Pull requests.
- In the list of pull requests, click the pull request you'd like to review.
- On the pull request, click Files changed.
- Review the changes in the pull request, and optionally, comment on specific lines.
- Above the changed code, click Review changes.
How do I create a pull request for a specific commit?
Next, you would need to cherry-pick the changes that you would like to include in the pull request. Head over to your GitHub repository, and you should see this. Simply click Compare & pull request to create a pull request in the repository that you would like to contribute with only the changes you picked.