Creating a pull request
git push command provided you with a direct URL for creating a pull request. You could also visit the GitHub repository to see a button for creating the pull request.
Pull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch. - GitHub Docs
Visiting the pull request URL takes you to the
Open a pull request page in GitHub:
You can view the changed files when you scroll down the page:
When creating a pull request, it helps to think that you are creating it for someone who is not very familiar with the things that the pull request will affect. You want to provide enough context and details to clarify the benefit of merging the pull request changes to the
master branch of the project.
- What is the pull request about? Does it add a new feature, fix an issue, or maybe remove some unnecessary stuff?
- How can one test it on their computer? It just works? Or maybe you need to set things up manually?
- Are there some known issues that one needs to take into account?
There's no exact correct level of information you want to provide. It all depends on your project, team, and complexity. Simple changes to simple projects might require less information than larger changes to a huge project.
This pull request removes the hard-coded login credentials from the robot to a vault for better security.
Is that enough? Well, not quite in this case. The purpose is clear, yes. It makes sense. But one can not just checkout this branch and run it since there is the requirement for setting up the vault file. Let's add some information.
To test this, create a
vault.jsonfile in your home directory (
/Users/<your-username>). Paste the following JSON and update the value for the
Update the path to the
vault.jsonfile in the
Looks better! Now there are instructions on making the thing run. Click the
Preview tab to preview the description:
Create pull request. You will see the
Pull requests link in the top navigation updates to show there is one open pull request:
Clicking on the
Pull requests link takes you to a listing of all open pull requests:
Notice that we did not edit the title of the pull request. In this case, the first commit message is used as the name. You can always go and edit the title if it is not descriptive enough!
Trivia: GitHub uses "pull request". GitLab uses merge request. Same same, but different.
- Pull requests are for reviewing and discussing proposed concrete changes to your project.
- Pull requests are a way to verify/improve/modify changes before merging them into the
- The pull request description should provide enough information so that someone can verify and test the changes.