How to resolve merge conflicts on a branch that is based on another branch that was previously merged to main

Problem to solve

I’m running into merge conflicts when merging a branch that is based on a previous branch that was previously merged. Gitlab states the branch is 2 commits behind. What’s the best way to handle this

Steps to reproduce

  1. Create a new branch(A0) off of main.
  2. Modify the code in the branch(A0).
  3. Create a new branch(A1) off of A0.
  4. Modify the code in the branch(A1).
  5. Merge A0 into main.
  6. Merge A1 into main. Here you will receive a merge failure saying 2 commits are missing from the source branch.