MicrolearnENPTES

Feature branches and pull requests

Lesson 20 of 24 · Git.Micro

Teams rarely push straight to main. Each change goes on its own branch, which is pushed and reviewed in a pull request before it is merged.

git push -u origin branch publishes a new branch on the server.

A pull request (merge request on GitLab) is a page on the server where the team discusses and approves the branch.

After the merge on the server, git switch main and git pull bring the result to you.

Check yourself

Where does a pull request happen?

On the hosting server (GitHub, GitLab…), not in the git command

Create a branch contact-form, commit a new file contact.html there and push the branch to origin (with upstream) so the team can review it. main on the server must not change.

contact-form on the server matches your contact-form

Do it in the browser: a real Git tool, a short mission and instant feedback. No install.

Start this lesson — free
← When a push is rejectedFix the last commit: --amend →

All lessons · Git.Micro