Git:合并后'主人无法解析到分支' [英] Git: 'Master cannot be resolved to branch' after merge
问题描述
致命: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屋!