Lessons · Git · asking somebody to merge it
Proposing a change
A pull request (merge request on GitLab) is a proposal to merge one branch into another, reviewed on the hosting platform before it lands. Git itself has branches; the platform adds the conversation.
Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.
What it is for
Review is how teams catch mistakes and share knowledge before code reaches main. The pull request is where the diff, the discussion and the checks meet.
How to think about it
Branch, commit, push the branch, open the pull request against main with a description that says what and why. Respond to review with more commits on the same branch; the request updates itself.
Worked example
git switch -c fix-timeoutWork on a branch, never directly on main.
git commit -am "Fix login timeout"Commit the change.
git push -u origin fix-timeoutPublish the branch.
# open a pull request from fix-timeout into main on the hosting siteReview happens there; merging is one button, and checks can be required first.
Your turn
Publish the branch the pull request will come from.
git push -u origin
Try it in a real repository
The trap
A pull request is a platform feature, not a Git command. Git has no concept of review; it has branches, and the platform builds the conversation on top.