Merge requests¶
Merge requests allow you to check source code changes into a branch. When you open a merge request, you can visualise the code changes before merging and work on them together. Merge requests contain:
A description of the request
Code changes and code reviews
Information about CI/CD-Pipelines
discussion posts
the list of commits
Tip
If you have created a fork, do not issue the merge requests from the main
branch. This avoids the following difficulties:
You can then work on several merge requests instead of just one.
If your merge request has been accepted, you can no longer make a
git pullbecause you have conflicting commits.If the
mainbranch of the target repository is protected, people with the maintainer role can no longer edit the merge request. All changes would then have to go through you.
See also
Merge request workflows¶
You check out a new branch and submit your changes through a merge request.
You gather feedback from your team.
You work on the implementation and optimise the code with code quality reports.
You verify your changes with reports from unit tests in GitLab CI/CD.
You avoid using dependencies whose licence is incompatible with your project with licence compliance reports.
You request approval of your changes.
When the merge request is approved, GitLab CI/CD will deploy the changes to the
productionenvironment.