我正在嘗試使用云 sdk 將代碼從本地 Windows 推送到云源存盤庫,我關注的鏈接是
https://cloud.google.com/source-repositories/docs/authentication
在我的云 sdk 中運行第一個命令時
gcloud init && git config --global credential.https://source.developers.google.com.helper gcloud.cmd
它運行時沒有任何問題,但它沒有在我的本地檔案夾中生成 .git 檔案夾,當我運行第二個命令時
git remote add google https://source.developers.google.com/p/la-gcp-test/r/demo-repo
我收到這個錯誤
fatal: not a git repository (or any of the parent directories): .git
我想要做的就是使用云 sdk 將一個簡單的 index.html 檔案從我的本地 Windows 機器上傳到云源存盤庫。
uj5u.com熱心網友回復:
正如您懷疑的那樣,您失蹤了git init,這一定是在您可以之前發生的git remote add。
如果您在遇到之前還沒有初始化本地存盤庫git remote add,那么就git init在您之前git remote add
我很驚訝 Google 檔案沒有包含它。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/341652.html
下一篇:Git/Windows-簽出分支(和拉取/合并分支)時的區分大小寫問題。受影響的檔案在Windows資源管理器中全部為小寫
