How to resolve merge conflict in Amplify + Next MonoRepo

For bootstrapping a startup, depending on the business requirement, one of the best tech stack can be Amplify + NextJs. Now, when working with Amplify + NextJs MonoRepo, this is how you should push your changes, still there can be instances where you're faced with a git merge error

  1. Fetch remote staging into local staging, while staying in your branch
git fetch origin staging:staging
  1. Merge local staging into development branch
  2. Resolve git conflict by accepting changes of your branch if you made changes to those files, and for the rest of them you didn’t change just accept staging version.
  3. Amplify pull
  4. Commit & push team-provider-info.json & backend-config.json files, since they now contain the latest amplify configs.