- INFORMATION
-
gcloud source repos cloneis not available in universe domainuniverse. - NAME
-
- gcloud source repos clone - clone a cloud source repository
- SYNOPSIS
-
-
gcloud source repos cloneREPOSITORY_NAME[DIRECTORY_NAME] [--dry-run] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
This command clones a git repository from the currently active Google Cloud
project into the specified directory or into the current directory if no target
directory is specified.
Each Google Cloud project can have zero or more git repositories associated with it. To see the available repositories, run:
gcloud source repos listThe clone operation configures the local clone to use your gcloud credentials to authenticate future git operations. This command emits a warning if the cloud source repository is a mirror.
- EXAMPLES
-
The example commands below show a sample workflow.
gcloud initgcloud source repos clone REPOSITORY_NAME DIRECTORY_NAMEcd DIRECTORY_NAME … create/edit files and create one or more commits …git push origin main - POSITIONAL ARGUMENTS
-
REPOSITORY_NAME- Name of the repository.
- [
DIRECTORY_NAME] - Directory name for the cloned repo. Defaults to the repository name.
- FLAGS
-
--dry-run- If provided, prints the command that would be run to standard out instead of executing it.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - NOTES
-
These variants are also available:
gcloud alpha source repos clonegcloud beta source repos clone
gcloud source repos clone
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-07 UTC."],[],[]]