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
I suggest checking if you are able to switch to the branch that you are trying to merge with.
I got this error even though the branch I wanted to merge with was in local repository and there were no spelling errors.
I ignored my local changes so that I could switch to the branch (Stash or commit can also be preferred). After this I switched back to the initial branch, and the merge was successful.