Utiliser Cloud Source Repositories dans Cloud Code for IntelliJ
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Grâce à Cloud Code, vous pouvez ajouter de nouveaux projets dans Cloud Source Repositories et extraire des projets existants.
Avant de commencer
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Importez votre code sur Cloud Source Repositories à partir de Cloud Code :
Ouvrez le projet que vous souhaitez ajouter dans Cloud Source Repositories.
Cliquez sur VCS > Upload to Cloud Source Repositories (VCS > Transférer vers Cloud Source Repositories). Vous pouvez également accéder à Tools>Google Cloud Code>Upload to Cloud Source Repositories (Outils > Google Cloud Code > Importer dans Cloud Source Repositories).
Dans la boîte de dialogue, utilisez le menu déroulant pour sélectionner le projet Cloud associé à votre projet.
Utilisez le menu déroulant du champ Cloud Repository pour sélectionner votre dépôt Cloud Repository.
Si vous ne possédez pas de dépôt ou si vous souhaitez en créer un, cliquez sur Create a new cloud repository (Créer un dépôt cloud).
Cloud Code ouvre une nouvelle fenêtre de navigateur dans la consoleGoogle Cloud pour vous permettre de créer le dépôt.
Par défaut, le Cloud Code définit le Remote Name (Nom à distance). Vous pouvez entrer un nom différent dans le champ New Remote Name (Nouveau nom distant).
Cliquez sur Importer.
Développement
Pour d'autres opérations, comme l'envoi et l'importation de nouvelles modifications, accédez à VCS>VCS Operations Popup (Fenêtre pop-up des opérations VCS).
Parcourir les fichiers sources
Après avoir importé votre code source, parcourez le code dans la console Google Cloud :
Dans la consoleGoogle Cloud , sélectionnez le projet contenant votre code source.
Dans la barre de recherche, saisissez Cloud Source Repositories et lancez la recherche.
Vérifier le code source
Vérifiez le code source depuis Cloud Source Repositories :
Sélectionnez VCS > Get from Version Control (Système de contrôle des versions > Obtenir depuis…). Vous pouvez également accéder à la boîte de dialogue de bienvenue et cliquer sur Obtenir à partir de VCS.
Dans le menu déroulant Version Control (Contrôle des versions), sélectionnez Google Cloud, puis cliquez sur Clone (Cloner).
Dans la boîte de dialogue Clone from Google Cloud (Cloner depuis Google Cloud), sélectionnez le projet Cloud associé à votre projet dans le champ Cloud Project (Projet Cloud).
Sélectionnez votre dépôt cloud dans le champ Cloud Repository (Dépôt Cloud).
Sélectionnez le répertoire parent dans le champ Parent Directory (Répertoire parent).
Entrez le nom du répertoire dans le champ Directory Name (Nom du répertoire).
Cliquez sur Clone (Cloner).
Vous pouvez également effectuer l'extraction depuis l'écran Welcome (Bienvenue) en sélectionnant Get from Version Control (Extraire depuis Version Control) et en sélectionnant Google Cloud dans la liste déroulante de Version Control. La boîte de dialogue Clone from Google Cloud (Cloner depuis Google Cloud) s'affiche.
Obtenir de l'aide
Pour envoyer des commentaires ou signaler un problème dans votre IDE IntelliJ, accédez à Outils > Cloud Code > Aide / À propos > Envoyer des commentaires ou signaler un problème pour signaler un problème sur GitHub.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/05 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/05 (UTC)."],[[["\u003cp\u003eCloud Code allows you to upload existing projects to Cloud Source Repositories directly from your IDE.\u003c/p\u003e\n"],["\u003cp\u003eYou can create a new Cloud Repository if one doesn't exist during the upload process.\u003c/p\u003e\n"],["\u003cp\u003eAfter uploading, you can browse your source code in the Google Cloud console by searching for \u003ccode\u003eCloud Source Repositories\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eCloud Code enables you to check out source code from Cloud Source Repositories via the "Get from Version Control" option, either in the VCS menu or the welcome screen.\u003c/p\u003e\n"],["\u003cp\u003eFor feedback or issues, you can use the "Submit feedback or report an issue" option in the IDE's Cloud Code menu to report directly to GitHub.\u003c/p\u003e\n"]]],[],null,["# Use Cloud Source Repositories in Cloud Code for IntelliJ\n\nThrough Cloud Code, you can add new projects to\n[Cloud Source Repositories](/tools/cloud-repositories/docs) and check out\nexisting projects.\n| **Note:** The following IDEs support this feature:\n|\n| - IntelliJ IDEA - Ultimate\n| - IntelliJ IDEA - Community\n| - [Other IntelliJ Platform-based IDEs](/code/docs/intellij/ides)\n\nBefore you begin\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\nUpload source code\n------------------\n\nUpload your code to Cloud Source Repositories from Cloud Code:\n\n1. Open the project you want to add to Cloud Source Repositories.\n\n2. Click **VCS** \\\u003e **Upload to Cloud Source Repositories** . Alternatively, in\n the menu, navigate to **Tools** \\\u003e **Google Cloud Code** \\\u003e\n **Upload to Cloud Source Repositories**.\n\n3. In the dialog, use the drop down menu to select the **Cloud Project**\n associated with your project.\n\n4. Use the drop down menu to select your **Cloud Repository**.\n\n 1. If you don't have a repository, or if you want to create a new one, click\n **Create a new cloud repository**.\n\n Cloud Code opens a new browser window to the\n Google Cloud console so that you can create the new repository.\n5. By default, Cloud Code sets the **Remote Name** . You can enter\n a different name in the **New Remote Name** field.\n\n6. Click **Upload**.\n\nDevelopment\n-----------\n\nFor other operations such as committing and pushing new changes, navigate to\n**VCS** \\\u003e **VCS Operations Popup**.\n\nBrowse source files\n-------------------\n\nAfter uploading your source code, browse the code in the Google Cloud console:\n\n1. In the [Google Cloud console](https://console.cloud.google.com/), select the project that\n contains your source code.\n\n2. In the search bar, search for `Cloud Source Repositories`.\n\nCheck out source code\n---------------------\n\nCheck out source code from Cloud Source Repositories:\n\n1. Choose **VCS \\\u003e Get from Version Control** . Alternatively, go to the welcome dialog and click **Get from VSC**.\n2. Select **Google Cloud** from the **Version Control** drop-down and click **Clone**.\n3. In the **Clone from Google Cloud** dialog, select the **Cloud Project** associated with your project.\n4. Select your **Cloud Repository**.\n5. Select the **Parent Directory**.\n6. Enter the **Directory Name**.\n7. Click **Clone**.\n\nYou can alternatively check out from the **Welcome** screen by selecting\n**Get from Version Control** and choosing **Google Cloud** from the\nVersion Control drop-down. This displays the **Clone from Google Cloud** dialog.\n\nGet support\n-----------\n\nTo submit feedback or report an issue in your IntelliJ IDE, go to **Tools** \\\u003e **Cloud Code** \\\u003e **Help / About** \\\u003e **Submit\nfeedback or report an issue** to report an issue on [GitHub](https://github.com/GoogleCloudPlatform/cloud-code-intellij/issues)."]]