删除代码库

要从 Cloud Source Repositories中删除代码库,请执行以下操作:

控制台

  1. 在 GCP Console 中打开源代码视图:

    在 Console 中打开源代码视图

  2. 点击要删除的代码库旁边的 更多 按钮 “更多”按钮

    “创建代码库”按钮

  3. 选择删除

  4. 在提示位置输入代码库名称,然后确认删除。

gcloud

从命令行调用以下命令:

gcloud init
gcloud source repos delete [REPOSITORY_NAME]

响应如下所示:

If [REPOSITORY_NAME] is deleted, the name cannot be reused for up to
seven days.

Delete "[REPOSITORY_NAME]" in project "gcloud-test" (Y/n)?  y

Deleted [REPOSITORY_NAME].