Crea una aplicación nueva a partir de una muestra personalizada en Cloud Code para IntelliJ
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Una vez que hayas configurado tu repositorio de muestra (o si ya se configuró uno para ti), puedes comenzar a crear aplicaciones con estas muestras.
Como alternativa, puedes importar el repositorio de muestras de Cloud Code si solo quieres probar la experiencia de muestras personalizadas. Para comprender mejor cómo se configuran los repositorios de muestras personalizados, te recomendamos que intentes bifurcar el repositorio y modificar su estructura y contenido antes de importarlo. Para ello, crea muestras nuevas en el repositorio o modifica el código fuente para crear tus propias versiones de las apps de muestra de Hello World o de Kubernetes Custom Sample.
Cómo crear tu app a partir de una muestra importada
Para crear una aplicación nueva con una de las muestras de tu repositorio de muestras, sigue estos pasos:
Copia la URL de Git del repositorio de muestra que deseas usar.
Navega a la página de configuración de Muestras personalizadas con Archivo > Configuración > Herramientas > Cloud Code > Muestras personalizadas o, para Mac OS X, IntelliJ IDEA > Preferencias > Herramientas > Cloud Code > Muestras personalizadas.
Haz clic en + Agregar para abrir el diálogo Repositorio de muestras de aplicaciones personalizadas.
Ingresa la URL de Git que copiaste antes en el campo URL del repositorio y haz clic en Siguiente.
La URL de este ejemplo tiene el formato HTTPS de GitHub: https://github.com/username/repo-name.git.
Haz clic en Agregar para autorizar el uso del repositorio en tu IDE, si es necesario, y para agregar el repositorio de muestra a tu IDE.
Si se agregó correctamente el repositorio, verás una marca de verificación verde en la columna Estado de la tabla de repositorios de muestra.
El campo de rama se completa automáticamente con la rama predeterminada del repositorio. Para editar la rama, selecciona el proyecto y haz clic en el botón de edición de la tabla.
Si se muestra un ícono de advertencia en la columna Estado, coloca el cursor sobre él para obtener más información sobre por qué tu repositorio no es válido.
Para actualizar tu repositorio según corresponda y verificar su estado en el IDE, haz clic en Reload Repositories.
Crea un proyecto nuevo. Para ello, navega a File > New > Project.
Selecciona Cloud Code: Custom.
Para usar la versión más reciente de tus muestras en Cloud Code, haz clic en Actualizar.
Elige una muestra de la lista de muestras personalizadas disponibles y haz clic en Siguiente para continuar.
Elige un nombre y una ubicación del proyecto para tu nueva app.
Una vez que haces clic en Finalizar, Cloud Code crea la app con la muestra elegida y la abre para usarla.
Obtenga asistencia
Para enviar comentarios o informar un problema en tu IDE de IntelliJ, ve a Tools > Cloud Code > Help / About > Submit feedback or report an issue para informar un problema en GitHub.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[[["\u003cp\u003eCloud Code requires Git version 2.25.0 or later to use custom samples.\u003c/p\u003e\n"],["\u003cp\u003eYou can start creating applications using your own sample repository after setting it up, or by importing the provided Cloud Code sample repository.\u003c/p\u003e\n"],["\u003cp\u003eTo add a custom sample repository, copy its HTTPS Git URL, navigate to the Custom Samples settings in your IDE, and add the URL, following the authorization prompts.\u003c/p\u003e\n"],["\u003cp\u003eAfter successfully adding a custom sample repository, the IDE displays a green checkmark, and you can create a new project by selecting "Cloud Code: Custom" and then choosing a sample.\u003c/p\u003e\n"],["\u003cp\u003eUsers can use the "Submit feedback or report an issue" feature in their IDE to get support.\u003c/p\u003e\n"]]],[],null,["# Create a new application from a custom sample in Cloud Code for IntelliJ\n\n| **Note:** To use custom samples with Cloud Code, you need to have Git version 2.25.0 or later installed on your local machine.\n\nOnce you've [set up your sample repository](/code/docs/intellij/set-up-sample-repo)\n(or one has been set up for you), you can start creating applications with these\nsamples.\n\nAlternatively, you can import the\n[Cloud Code sample repository](https://github.com/GoogleCloudPlatform/cloud-code-custom-samples-example/)\nif you'd just like to try out the custom sample experience. To better\nunderstand how custom sample repositories are set up, it is recommended that\nyou try forking the repository and modifying its structure and content\nbefore importing it. You can do this by creating new samples within the\nrepository or modifying the source code to create your own versions of the\nHello World or Kubernetes Custom Sample apps.\n\nCreating your app from an imported sample\n-----------------------------------------\n\nTo create a new application using one of the samples from your sample\nrepository, follow these steps:\n\n1. Copy the Git URL of the sample repository that you'd like to use.\n\n | **Note:** Using a **HTTPS** Git URL is recommended. If you'd like to use a SSH URL instead, you'll need to make sure your local machine is set up correctly. Refer to your Git repository hosting service (such as [GitHub](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh), [Bitbucket](https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/), and [GitLab](https://docs.gitlab.com/ee/user/ssh/)) for detailed instructions on generating and configuring SSH keys.\n | **Note:** If you're using a Git repository hosted live on your local machine, its URL should be of the form `/path/to/repo`, without a '.git' suffix.\n2. Navigate to the Custom Samples settings page with **File** \\\u003e\n **Settings** \\\u003e **Tools** \\\u003e **Cloud Code** \\\u003e **Custom Samples** or for Mac OS X,\n **IntelliJ IDEA** \\\u003e **Preferences** \\\u003e **Tools** \\\u003e **Cloud Code** \\\u003e **Custom Samples**.\n\n3. Click **+ Add** to open the Repository for Custom Application Samples dialog.\n\n4. Enter the Git URL you copied earlier in the Repo URL field and click\n **Next**.\n\n The URL in this example is of the HTTPS GitHub format: `https://github.com/username/repo-name.git`.\n\n5. Click **Add** to authorize your use of the repository in your IDE, if\n necessary, and to add the sample repository to your IDE.\n\n6. If your repository addition is successful, you'll see a\n green check mark in the Status column of your table of sample repositories.\n The branch field is automatically populated with the repository's default\n branch. To edit the branch, select the project and click the table's edit\n button.\n\n If a warning icon is displayed in the Status column, hold your pointer over\n the icon to get more information about why your repository is not valid.\n7. To update your repository accordingly and check the repository's status in\n your IDE, click\n **Reload Repositories**\n\n8. Create a new project by navigating to **File** \\\u003e **New** \\\u003e **Project**.\n\n9. Select **Cloud Code: Custom**.\n\n10. To use the latest version of your samples in Cloud Code, click\n **Refresh**.\n\n11. Choose a sample from the list of available custom samples and click **Next**\n to proceed.\n\n12. Pick a name and project location for your new app.\n\n Once you click **Finish**, Cloud Code creates your app using\n your chosen sample and opens it for use.\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)."]]