Rebasing, pulling, merging and what not could lead to the following Git error:
fatal: refusing to merge unrelated histories. Here’s the solution.
In most of the cases run the following commands:
git fetch --prune git pull origin main --allow-unrelated-histories
In case of merging two or multiple Git repos:
git merge app2/main --allow-unrelated-histories