Git Pull Request
A pull request (PR) asks the owners of a repository to review the commits on your branch and merge them into another branch, usually main.
Pull requests are a feature of the hosting site, not of Git itself. GitLab calls them merge requests. You push a branch with Git, then open the pull request on the site.
Push a branch for a pull request
Make your change on its own branch and push it:
git switch -c update-readme
Switched to a new branch 'update-readme'
git commit -am "Add more text to README"
[update-readme 1d9056a] Add more text to README
1 file changed, 1 insertion(+)
git push -u origin update-readme
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 16 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 350 bytes | 350.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
branch 'update-readme' set up to track 'origin/update-readme'.
To https://github.com/w3schools-test/hello-world.git
* [new branch] update-readme -> update-readme
Open the Pull Request
On GitHub, open the repository, click Compare & pull request for the new branch, describe your change and click Create pull request.
New commits you push to the same branch are added to the open pull request.