Using Cloud Source Repositories
Through IntelliJ IDEA, you can add new projects to Cloud Source Repositories and check out existing projects.
Before you begin
Sign in to your Google account.
If you don't already have one, sign up for a new account.
- Select or create a Cloud Platform project.
- Enable billing for your project.
Uploading source code
Upload your code to Cloud Source Repositories from IntelliJ IDEA as follows:
- In IntelliJ IDEA, open the project you want to add to Cloud Source Repositories.
- Choose VCS > Import into Version Control > Setup on Google Cloud Source Repositories.
- In the dialog, use the drop down menu to select the Cloud Project associated with your project.
- Use the drop down menu to select your Cloud Repository.
- If you do not have a repository, or if you want to create a new one, click Create a new cloud repository.
- IntelliJ IDEA will open a new browser window to the Google Cloud Platform Console so that you can create the new repository.
By default, IntelliJ IDEA sets the Remote Name. You can enter a different name in the New Remote Name field.
Browsing the source files
After uploading your source code, browse the code in the Google Cloud Platform Console as follows:
- In the Google Cloud Platform Console, select the project that contains your source code.
- In the left navigation bar, find the Tools section.
- Select Development > Source Code.
Checking out the source code
Check out source code from Cloud Source Repositories as follows:
Choose VCS > Checkout from Version Control > Google Cloud.
- In the Clone from Google Cloud dialog, select the Cloud Project associated with your project.
- Select your Cloud Repository.
- Select the Parent Directory.
- Enter the Directory Name.
- Click Clone.
You can alternatively check out from the Welcome screen by selecting Check out from Version Control > Google Cloud to display the Clone from Google Cloud dialog.