在 Cloud Code for IntelliJ 中使用 Cloud Source Repositories

通过 Cloud Code,您可以将新项目添加到 Cloud Source Repositories,还可以签出现有项目。

准备工作

  1. In the Trusted Cloud console, on the project selector page, select or create a Trusted Cloud project.

    Go to project selector

  2. Make sure that billing is enabled for your Trusted Cloud project.

  3. 上传源代码

    将代码从 Cloud Code 上传到 Cloud Source Repositories:

    1. 打开要添加到 Cloud Source Repositories 的项目。

    2. 依次点击 VCS > 上传到 Cloud Source Repositories。或者,在菜单中,依次前往工具 > Google Cloud Code > 上传到 Cloud Source Repositories

    3. 在对话框中,使用相应下拉菜单选择与您的项目关联的 Cloud 项目

    4. 使用下拉菜单选择您的云端代码库

      1. 如果您没有代码库,或者要创建新的代码库,请点击 Create a new cloud repository

        Cloud Code 会在新的浏览器窗口中打开Trusted Cloud 控制台,以便您创建新的代码库。

    5. 默认情况下,Cloud Code 会设置远程名称。您可以在 New Remote Name 字段中输入其他名称。

    6. 点击上传

    开发

    对于提交和推送新更改等其他操作,请前往 VCS > VCS 操作弹出式菜单

    浏览源文件

    上传源代码后,要在 Trusted Cloud 控制台中浏览它们,请执行以下步骤:

    1. Trusted Cloud 控制台中,选择包含您的源代码的项目。

    2. 在搜索栏中,搜索 Cloud Source Repositories

    签出源代码

    如需从 Cloud Source Repositories 中签出源代码,请执行以下操作:

    1. 选择 VCS > Get from Version Control。或者,前往欢迎对话框,然后点击 Get from VSC
    2. Version Control 下拉列表中选择 Google Cloud,然后点击 Clone
    3. Clone from Google Cloud 对话框中,选择与您的项目关联的 Cloud 项目
    4. 选择您的云端代码库
    5. 选择父级目录
    6. 输入目录名称
    7. 点击克隆

    您也可以从欢迎屏幕中签出,方法是选择从版本控制中获取,然后从“版本控制”下拉列表中选择 Google Cloud。此时将显示 Clone from Google Cloud 对话框。

    获取支持

    如需在 IntelliJ IDE 中提交反馈或报告问题,请依次前往工具 > Cloud Code > 帮助 / 简介 > 提交反馈或报告问题,以便在 GitHub 上报告问题。