Skip to content

Resolving Merge Conflicts in GitLab

Merge conflicts occur when changes clash between branches. GitLab offers multiple ways to resolve these conflicts.

  1. Open the Merge Request with conflicts.
  2. Click Resolve conflicts.
  3. Use the Edit inline tool or the Web IDE to choose the correct changes.
  4. Mark the file as resolved and commit the resolution.
  5. Re-run the pipeline if required and merge.
Terminal window
git fetch origin
git checkout feature/new-feature
git merge origin/main
# Edit files to resolve conflicts
git add <file>
git commit -m "Resolve merge conflict"
git push