Hi Omar,
I’ve faced the same issue on one of my projects when I tried to merge a feature branch into the main branch.
Below are two ways to resolve it. You’ll need TortoiseGit or the Git command line client (I’ve used TortoiseGit).
Option 1:
According to Mendix Support this issue can occur if the last commit in one of the branches is a merge commit. If this the case, commit some change in that branch (e.g. just rename something or do a cosmetical change).
Unfortunately option 1 didn’t work for me.
Option 2: (worked for me)
Make sure you have committed all changes in your local branch before attempting to merge with the main branch.
Check if there are any conflicts between the changes in your local branch and the changes in the main branch. If there are conflicts, you will need to resolve them manually.