I just encountered a problem when merging a branch into master in git. First, I got the branch name by running git ls-remote. Let\'s call that branch \"branch-n
git ls-remote
I had the same problem. I fixed it using the command below:
git checkout main git fetch git checkout branch_name git fetch git checkout main git fetch git merge branch_name