Merge your branch into the main branch
After you have created a branch, made the required changes, and committed them locally, you push your branch and its commits to GitLab.
In the response to the git push
, GitLab provides a direct link to create the merge request. For example:
...
remote: To create a merge request for my-new-branch, visit:
remote: https://gitlab.example.com/my-group/my-project/merge_requests/new?merge_request%5Bsource_branch%5D=my-new-branch
To get your branch merged into the main branch:
- Go to the page provided in the link that was provided by Git and create your merge request. The merge request’s Source branch is your branch and the Target branch should be the main branch.
- If necessary, have your merge request reviewed.
- Have someone merge your merge request, or merge the merge request yourself, depending on your process.
Related topics
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support