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