git - git push 出错 [致命:远程端意外挂断]
问题描述
我的分支名称是大写的,比如 ABC。我误用了小写字母 abc。
git check out abc
即使在小写分支(abc)下,它仍然可以与 rebase 一起使用。rebase后,我开始推送代码,
git push origin ABC -f
得到错误,
致命:远端意外挂断
然后我查看了大写名称分支 ABC。推送时仍然出现错误。
我发现另一篇帖子讨论了它,但没有解决我的问题。 Git:合并后“主无法解析为分支”
解决方案
I tried this out.
Delete the false brach, abc.
git branch -d abc
Push the correct one,
git push origin ABC -f
error: src refspec ABC does not match any.
Then checkout ABC again,
git checkout ABC
Then push it again,
git push origin ABC -f
推荐阅读
- javascript - 仅切换 Reactjs 中单击的菜单
- python - 如何从 msg 文件中提取数据并将它们插入(附加)到 csv 文件?
- entity-framework-core - Entity Core 和 SaveChanges 只工作一次
- python-3.x - 如何使用交叉验证和预测标签测试看不见的测试数据?
- android - 如果你想用它来保护整个应用程序(例如银行应用程序),你如何正确配置 local_auth?
- javascript - 检查 HTML 元素是否在视口中
- amp-html - amp-script:innerHTML 按原样呈现与符号转义的序列
- aspnetboilerplate - 获取 ABP .NET 核心框架中的所有父表行和所有子表行
- javascript - Javscript Math.Pow 乘法
- linux - 我们可以在 azure 管道 yaml 文件中编写用户定义函数吗?