Git: 'Master cannot be resolved to branch' after merge

前端 未结 2 1222
广开言路
广开言路 2021-01-12 18:07

Every time I merge a branch back into my master branch, I can no longer push to origin. I get the message fatal: master cannot be resolved to branch

I m

相关标签:
2条回答
  • 2021-01-12 18:37

    Could it be that you write Master instead of master? If the system is case sensitive they wouldn't match, and lower-case master is the default in most repositories.

    0 讨论(0)
  • 2021-01-12 18:44

    Another issue might be this with your workflow:

    Created a new branch git branch TestBranch

    With the command above, you create a branch, but do not switch to it.

    I believe you should checkout manually by git checkout TestBranch or create the branch with checkout and create it by git checkout -b TestBranch.

    0 讨论(0)
提交回复
热议问题