Ruby: 解决 "failed to push some refs to '[...]'"
本文档属于故障排除指南的一部分。您可以在此处查看完整指南:您的 Ruby 服务遇到问题了吗?解决方案可能就在这里!。
👋 欢迎查阅 Stackhero 文档!
Stackhero 提供即开即用的 Ruby cloud 解决方案,带来诸多优势,包括:
- 只需一次简单的
git push,即可在几秒钟内部署您的应用。- 支持自定义域名,并自动配置 HTTPS 证书,提升安全性。
- 享受自动备份、一键更新,以及简单、透明、可预测的定价。
- 依托专属私有基础设施,实现卓越的性能与强大的安全性。
节省时间,简化流程:仅需5分钟即可体验 Stackhero 的 Ruby cloud hosting 解决方案!
此错误可能在部署期间出现:
error: failed to push some refs to '[...]'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
此消息表明您的实例上的 Git 仓库包含本地不存在的内容。要继续,您可以使用以下命令强制同步:
git push -f stackhero main