Skip to content

How to fix Merge Conflicts

Conflicts can arise because many contributors work on the repository, and changes can break your PR which is pending a review and merge.

Since we squash all commits, you may not need to do a rebase. However, if a rebase is requested, follow these steps to rebase your PR branch onto main:

  1. Rebase your local copy:

    Terminal window
    git checkout <pr-branch>
    git pull --rebase upstream main
  2. If the rebase stops because of conflicts, edit the affected files to resolve them and remove the conflict markers. Stage each resolved file and continue the rebase:

    Terminal window
    git add <resolved-file>
    git rebase --continue

    Repeat this step if Git encounters more conflicts, until the rebase completes.

  3. Push back your changes to the PR

    Terminal window
    git push --force origin <pr-branch>