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

前端 未结 25 1324
隐瞒了意图╮
隐瞒了意图╮ 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:22

    This error suggest that the branch from where you want to merge changes (i.e. in you case branch-name) is not present in you local, so you should checkout the branch and fetch the local changes. Checkout to your master branch and fetch, then follow the below steps:

    git checkout branch-name
    git pull
    git checkout new-branch-name
    git merge branch-name
    

提交回复
热议问题