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
You might also encounter this error if you are not using origin keyword and the branch isn't one of your own.
origin
git checkout git merge origin/