gitpractice.dev

brewly — Ch.5 · Your first pull request

Exercise 1 of 6

Before you start

Pull requests

Teams rarely commit to main directly. You push a branch and open a pull request: a proposal to merge it, where colleagues read the changes and comment before it goes in.

Pull requests are not part of git. They come from the service hosting the repository, such as GitHub or GitLab. Here, open them with the Pull request button above the code.

The usual round

1. Push your branch. 2. Open the pull request with a title that says what changes, and a description that says why. 3. Wait for approval, then merge it with a button. 4. Bring your own main up to date.

git push -u origin <branch>
put your branch on the server
git switch main
go back to main
git pull
get the merged result
You can reopen this any time with “Lesson”.

Continue on a desktop

Typing git on a small screen is no fun. Open this page on a laptop or desktop to practise.

Back to the path