Ship a change with a pull request
Proof project · Article 9 of 9 · 3 min read
Use everything from this trail to get one change reviewed and merged.
The short version
A pull request asks other people to review a branch before it joins main. It is the normal way teams share changes.
Details
The flow is always the same: branch, commit, push, open the request, respond to feedback, merge. Keep the change small so it is easy to review.
Try it yourself
git switch -c improve-notes
echo "Better note" >> notes.txt
git add notes.txt
git commit -m "Improve notes"
git push -u origin improve-notes
Open the link Git prints, create the pull request, merge it on GitHub, then update your folder:
git switch main
git pull
Prove it
Your main branch should contain the commit Improve notes, and your repository on GitHub should show the merged pull request.
Explain it to the duck
Walk through each step from a new branch to a merged pull request and say why it exists.
Tested with: Git 2.51 and GitHub.
Where to go next
- Rebasing(opens in a new tab) Keep a branch history straight instead of merging.
- Git hooks(opens in a new tab) Run checks automatically before each commit.
- Continuous integration Run tests on every push so broken changes are caught early.