A partire dal 17 giugno 2024, Cloud Source Repositories non è disponibile per i nuovi clienti. Se la tua organizzazione non ha mai utilizzato Cloud Source Repositories, non puoi attivare l'API o utilizzare Cloud Source Repositories. I nuovi progetti non collegati a un'organizzazione non possono attivare l'API Cloud Source Repositories. Questa modifica non interessa le organizzazioni che hanno utilizzato Cloud Source Repositories prima del 17 giugno 2024.
Viene visualizzata una pagina con i contenuti del repository.
Fai clic su Modifica codice.
Si aprirà una nuova scheda del browser contenente l'ambiente Cloud Shell. Ti viene inoltre chiesto di confermare se vuoi clonare il repository in Cloud Shell.
Fai clic su Procedi.
Si apre un ambiente Cloud Shell contenente un clone del tuo repository.
Per impostazione predefinita, la posizione del repository è ~/[repository name]. Ad esempio, ~/hello-world.
Aprire un repository esistente con Cloud Shell
Se hai già clonato un repository in un ambiente Cloud Shell, segui i passaggi descritti nella sezione precedente. Quando l'ambiente Cloud Shell è pronto, ti viene chiesto di scegliere una delle seguenti opzioni:
Vai a quella directory. Per cambiare automaticamente le directory in quella contenente il tuo repository, scegli questa opzione. Ad esempio,
~/hello-world.
Vai a quella directory ed esegui git pull. Per cambiare automaticamente la directory in quella contenente il repository e recuperare la versione più recente del repository nell'ambiente Cloud Shell, scegli questa opzione.
Clona una nuova copia utilizzando il comando git clone. Per creare una nuova cartella contenente il repository nell'ambiente Cloud Shell, scegli questa opzione. La nuova cartella ha lo stesso nome del repository, con un numero aggiunto. Ad esempio, una seconda copia del repository,
hello-world, ha il nome ~/hello-world-2.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 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`."]]