Google Source Repositories Commands Pull and Push
By Robby
Google Source Repository Commands
- Using SSH
- Using Google Cloud SDK
- Using Manually Generated Credentials
Using Google Cloud SDK
- Install the Google cloud SDK .
- Ensure that the Cloud SDK is installed on your machine.
- Open a terminal window.
- If you’re using Windows, enter the following command:
gcloud init && git config credential.helper gcloud.cmd
If you’re using Linux or macOS, enter the following command:gcloud init && git config credential.helper gcloud.sh
- Add your local repository as a remote:
git remote add google \
Where:
https://source.developers.google.com/p/[PROJECT_NAME]/r/[REPO_NAME][PROJECT_NAME]
is the name of your Google Cloud project.[REPO_NAME]
is the name of your repository.
- Push your code to Cloud Source Repositories:
git push --all google