Desde el 17 de junio del 2024, Cloud Source Repositories no está disponible para los clientes nuevos. Si tu organización no ha usado Cloud Source Repositories anteriormente, no podrás habilitar la API ni usar Cloud Source Repositories. Los proyectos nuevos que no estén conectados a una organización no podrán habilitar la API Cloud Source Repositories. Este cambio no afecta a las organizaciones que hayan usado Cloud Source Repositories antes del 17 de junio del 2024.
Se abrirá una página con el contenido del repositorio.
Haz clic en Editar código.
Se abrirá una nueva pestaña del navegador con el entorno de Cloud Shell. También se te pedirá que confirmes si quieres clonar el repositorio en tu Cloud Shell.
Haz clic en Continuar.
Se abre un entorno de Cloud Shell que contiene una copia clonada de tu repositorio.
De forma predeterminada, la ubicación del repositorio es ~/[repository name]. Por ejemplo, ~/hello-world.
Abrir un repositorio con Cloud Shell
Si ya has clonado un repositorio en un entorno de Cloud Shell, sigue los pasos de la sección anterior. Cuando el entorno de Cloud Shell esté listo, se te pedirá que elijas una de las siguientes opciones:
Ve a ese directorio. Para cambiar automáticamente los directorios al que contiene tu repositorio, elige esta opción. Por ejemplo, ~/hello-world.
Ve a ese directorio y ejecuta git pull. Para cambiar automáticamente los directorios al que contiene tu repositorio y extraer la versión más reciente del repositorio al entorno de Cloud Shell, elige esta opción.
Clona una copia nueva con el comando git clone. Para crear una carpeta que contenga el repositorio en el entorno de Cloud Shell, elige esta opción. La nueva carpeta tiene el mismo nombre que el repositorio, con un número añadido. Por ejemplo, una segunda copia del repositorio, hello-world, tiene el nombre ~/hello-world-2.
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-11 (UTC)."],[],[],null,["# Browsing files in Cloud Shell\n\nThis topic describes how to browse files by using Cloud Shell.\n\nOpen a repository in Cloud Shell for the first time\n---------------------------------------------------\n\n1. In the Google Cloud console, open Cloud Source Repositories.\n\n [Open Cloud Source Repositories](https://source.cloud.google.com/repos)\n2. Click the name of a repository.\n\n A page opens, displaying the contents of the repository.\n3. Click **Edit code**.\n\n A new browser tab opens, containing the Cloud Shell environment. You're\n also prompted to confirm whether you want to clone the repository into your\n Cloud Shell.\n4. Click **Proceed**.\n\n A Cloud Shell environment opens, containing a clone of your repository.\n By default, the location of the repository is `~/[repository name]`. For\n example, `~/hello-world`.\n\nOpen an existing repository with Cloud Shell\n--------------------------------------------\n\nIf you have already cloned a repository into a Cloud Shell environment,\nfollow the steps in the preceding section. When the Cloud Shell environment\nis ready, you're prompted to select from one of the following options:\n\n- Navigate into that directory. To automatically change directories to the one containing your repository, choose this option. For example, `~/hello-world`.\n- Navigate into that directory and run `git pull`. To automatically change directories to the one containing your repository and pull the latest version of the repository to the Cloud Shell environment, choose this option.\n- Clone a new copy by using the `git clone` command. To create a new folder containing the repository in the Cloud Shell environment, choose this option. The new folder has the same name as the repository, with a number appended to it. For example, a second copy of the repository, `hello-world`, has the name `~/hello-world-2`."]]