How to resolve git's “not something we can merge” error

前端 未结 25 1250
隐瞒了意图╮
隐瞒了意图╮ 2020-12-04 05:42

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

25条回答
  •  醉梦人生
    2020-12-04 06:24

    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.

提交回复
热议问题