What Is a Merge Request?
A Merge Request lets you:- Propose changes from a source branch to a target branch (typically
mainormaster). - Collaborate through comments, inline code discussions, and approvals.
- Enforce quality gates by requiring passing CI/CD pipelines before merging.
Give your Merge Request a clear title and description. Assign reviewers early to accelerate feedback.
GitLab vs. GitHub: Core Concepts
| Concept | GitLab Merge Request | GitHub Pull Request |
|---|---|---|
| Feature Name | Merge Request | Pull Request |
| Default Target Branch | main (configurable) | main (or master) |
| CI/CD Integration | Built-in GitLab CI/CD pipelines | External or GitHub Actions |
| Draft Mode | Work in Progress MR | Draft Pull Request |
- Create a feature branch
- Commit your code
- Submit for review
- Discuss and revise
- Merge into the main codebase
Typical Merge Request Workflow
1. Create a Feature Branch
2. Develop and Commit Changes
3. Push to the Remote Repository
4. Open a Merge Request
- Go to Merge Requests → New merge request in your GitLab project.
- Select
feature-xyzas the Source branch andmainas the Target branch. - Add a descriptive title and detailed description of your changes.
5. Review and Iterate
- Reviewers leave comments or suggestions.
- Address feedback by pushing follow-up commits:
6. Merge When Ready
Once all approvals are in place and CI pipelines succeed, click Merge.Do not merge if the pipeline has failed. Failing tests or lint errors will propagate into your main branch.