PHP: 處理錯誤 "src refspec main does not match any"

本文件是快速開始指南的一部分。請在此處查看完整指南:如何在 Stackhero 上開始使用 PHP

👋 歡迎來到 Stackhero 文檔!

Stackhero 提供一個即用型的 PHP cloud 解決方案,帶來多項優勢,包括:

  • 只需一個簡單的 git push,即可在幾秒鐘內部署您的應用程式。
  • 使用您自己的域名,並享受 HTTPS 證書的自動配置,以增強安全性。
  • 享受自動備份一鍵更新,以及簡單、透明且可預測的定價,讓您高枕無憂。
  • 通過專用的私人 VM獲得最佳的性能和強大的安全性

節省時間簡化您的生活:只需 5 分鐘即可嘗試 Stackhero 的 PHP cloud hosting 解決方案!

如果看到以下錯誤:

error: src refspec main does not match any
error: failed to push some refs to 'ssh://<XXXXXX>.stackhero-network.com:222/project.git'

通常代表本地端沒有 main 分支。此時,您可以改為推送 master 分支:

git push stackhero master