Google Source Repositories Commands Pull and Push - Robert's Blog

Google Source Repositories Commands Pull and Push

By Robby 0 Comment October 22, 2021

Google Source Repository Commands

  • Using SSH
  • Using Google Cloud SDK
  • Using Manually Generated Credentials

Using Google Cloud SDK

  1. Install the Google cloud SDK .
  2. Ensure that the Cloud SDK is installed on your machine.
  3. Open a terminal window.
  4. 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
  5. Add your local repository as a remote:git remote add google \
    https://source.developers.google.com/p/[PROJECT_NAME]/r/[REPO_NAME]
    Where:
    • [PROJECT_NAME] is the name of your Google Cloud project.
    • [REPO_NAME] is the name of your repository.
  6. Push your code to Cloud Source Repositories:git push --all google

Add Comment

Your email address will not be published. Required fields are marked *