Git:合并后'主人无法解析到分支' [英] Git: 'Master cannot be resolved to branch' after merge

查看:756
本文介绍了Git:合并后'主人无法解析到分支'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我将一个分支合并到我的主分支中时,我都不能再推到原点。我得到消息致命:master无法解析为分支



我做了一个简单的测试更改:




  • 创建一个新分支 git branch TestBranch

  • 对TestBranch进行了更改并提交

  • 签出回到master git checkout Master

  • 合并TestBranch git merge TestBranch



合并似乎很顺利,但现在当我使用Git状态时,Master分支不会告诉我它在原点之前。



有人知道是什么导致了这个问题吗?

解决方案

难道你写的是主人而不是主人?如果系统区分大小写,则它们不匹配,小写大师是大多数存储库中的默认值。


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 made a simple test change:

  • Created a new branch git branch TestBranch
  • Made a change to TestBranch and commited
  • Checked out back to master git checkout Master
  • Merged TestBranch git merge TestBranch

The merge seems to have gone fine, but now when I use Git status the Master branch does not tell me that it is ahead of the origin. And when I try to push to origin Master I get the message above.

Does anybody know what is causing this problem?

解决方案

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.

这篇关于Git:合并后'主人无法解析到分支'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆