--- title: Cloud Source Repositories 推拉 tags: GCP # 簡報的標籤 --- ## PULL 點選source Repositories  ## 進入到倉庫內  ## 建立本機複本 切換至存放倉庫檔案的本機路徑  將倉庫內的檔案拉取至本機(需安裝cloud SDK)  貼上複製連結  # PUSH 將有變更的檔案推送至source Repositories  ## 將本地檔案推送到 Cloud Source Repositories 1. 使用終端機(需安裝cloud SDK) 2. Windows輸入指令 ``` gcloud init && git config credential.helper gcloud.cmd ``` Linux 或 macOS輸入指令 ``` gcloud init && git config credential.helper gcloud.sh ``` 3. 將本地路徑添加至雲端推送路徑 ``` git remote add google \ https://source.developers.google.com/p/[推送的專案ID]/r/[推送的倉庫] ``` 4. 將此資料夾的所有變化提交至暫存區(需先切換至存放倉庫檔案的本機路徑) ``` git add . ``` 5. 提交檔案 ``` git commit -m "輸入修改版本說明" ``` 6. 推送到 Cloud Source Repositories ``` git push --all google ``` [參考文件1](https://cloud.google.com/source-repositories/docs/pushing-code-from-a-repository#cloud-sdk) [參考文件2](https://blog.csdn.net/A_Runner/article/details/79634640)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up