gcloud source repos clone - clone a cloud source repository
gcloud source repos clone REPOSITORY_NAME [DIRECTORY_NAME] [--dry-run] [GCLOUD_WIDE_FLAG ...]
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 list
The 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.
The example commands below show a sample workflow.
$ gcloud init
$ gcloud source repos clone REPOSITORY_NAME DIRECTORY_NAME
$ cd DIRECTORY_NAME ... create/edit files and create one or more \ commits ...
$ git push origin master
- REPOSITORY_NAME
Name of the repository.
- [DIRECTORY_NAME]
Directory name for the cloned repo. Defaults to the repository name.
- --dry-run
If provided, prints the command that would be run to standard out instead of executing it.
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 help for details.
These variants are also available:
$ gcloud alpha source repos clone
$ gcloud beta source repos clone