Solution
Make sure local repo is updated by
git pull --rebase
Go to the feature branch and rebase to the main branch
git switch <feature-branch>git rebase main
If there’s a conflict, simply fix the conflict and add the fix by
git add .
Once satisfied with the fix, continue rebasing by
git rebase continue