Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Salvar um notebook no GitHub
Para fazer backup da instância de notebooks gerenciada pelo usuário e disponibilizá-la para outras pessoas, salve o conteúdo dessa instância no GitHub.
Crie um repositório do GitHub
Se você ainda não tiver um repositório do GitHub, crie um.
Ao criar um repositório do GitHub, verifique se o repositório do GitHub pode ser clonado marcando a caixa de seleção Inicializar este repositório com um README.
Clone o repositório do GitHub na
instância dos notebooks gerenciados pelo usuário
Para clonar o repositório do GitHub na instância
de notebooks gerenciados pelo usuário, conclua as seguintes etapas:
No seu repositório do GitHub, clique no botão Code e na guia Local.
Copie o URL em HTTPS.
No Console do Google Cloud, acesse a página Notebooks gerenciados.
Adicionar seus arquivos confirmados ao repositório do GitHub
Sua instância de notebooks gerenciados pelo usuário mostra o repositório
como uma nova pasta. Se você não vir seu repositório clonado do GitHub como uma pasta, clique no botão Atualizar lista de arquivos.
Clique duas vezes na pasta do repositório para abri-la.
Adicione um novo notebook à instância de notebooks gerenciados pelo usuário.
Para adicionar um arquivo do notebook, use o menu ou o acesso rápido.
Menu
Para adicionar um novo arquivo de notebook no menu, selecione
Arquivo > Novo > Notebook.
Na caixa de diálogo Selecionar kernel, selecione o kernel do novo
notebook, como o Python 3, e clique em Selecionar.
O novo arquivo do notebook será aberto.
Launcher
Para adicionar um novo arquivo de notebook no acesso rápido, selecione
File > New > Launcher.
Clique no bloco para o kernel que você quer usar.
O novo arquivo do notebook será aberto.
Renomeie o novo arquivo do notebook.
Menu
Selecione Arquivo > Renomear notebook. A
caixa de diálogo Rename file é aberta.
No campo Novo nome, altere Untitled.ipynb para algo
significativo, como install.ipynb.
Clique em Renomear.
Launcher
Clique com o botão direito do mouse na guia Untitled.ipynb e clique em Renomear notebook. A caixa de diálogo Rename file é aberta.
No campo Novo nome, altere Untitled.ipynb para algo
significativo, como install.ipynb.
Clique em Renomear.
Selecione a guia Git. O novo notebook é apresentado no grupo Não rastreado.
Para adicionar o novo notebook como um arquivo no repositório do GitHub, clique com o botão direito do mouse no novo notebook e selecione Rastrear. Na guia Git, o notebook será adicionado ao agrupamento Staged.
Para enviar o novo notebook ao repositório do GitHub, na guia Git, adicione um comentário de confirmação e clique em Confirmar.
Para abrir uma janela de terminal do Git, selecione
Git > Abrir repositório Git no terminal.
Na janela de terminal do Git, digite o comando git push.
Se você usar um nome de usuário e uma senha do GitHub, quando solicitado, digite o nome de usuário e a senha do GitHub.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-04 UTC."],[],[],null,["# Save a notebook to GitHub\n=========================\n\n\n| Vertex AI Workbench managed notebooks is\n| [deprecated](/vertex-ai/docs/deprecations). On\n| April 14, 2025, support for\n| managed notebooks will end and the ability to create managed notebooks instances\n| will be removed. Existing instances will continue to function\n| but patches, updates, and upgrades won't be available. To continue using\n| Vertex AI Workbench, we recommend that you\n| [migrate\n| your managed notebooks instances to Vertex AI Workbench instances](/vertex-ai/docs/workbench/managed/migrate-to-instances).\n\n\u003cbr /\u003e\n\nTo back up your managed notebooks instance and make it available\nto others, save the contents of your managed notebooks instance\nto GitHub.\n\nCreate a GitHub repository\n--------------------------\n\nIf you don't already have a [GitHub](https://github.com/) repository, you must create one.\n\nWhen you create your GitHub repository make sure that your GitHub repository\ncan be cloned by selecting the **Initialize this repository with a README**\ncheckbox.\n\nClone your GitHub repository in your managed notebooks instance\n---------------------------------------------------------------\n\nTo clone your GitHub repository in your managed notebooks\ninstance, complete the following steps:\n\n1. In your GitHub repository, click the **Code** button,\n and then click the **Local** tab.\n\n2. Copy the **HTTPS** URL.\n\n3. In the Google Cloud console, go to the **Managed notebooks** page.\n\n [Go to Managed notebooks](https://console.cloud.google.com/vertex-ai/workbench/managed)\n4. Click **Open JupyterLab** to open\n your managed notebooks instance.\n\n5. In the JupyterLab\n folder **File Browser**, select\n the folder where you want to clone the GitHub repository. For example,\n the home folder.\n\n6. In JupyterLab, select\n **Git \\\u003e Clone a Repository**.\n\n7. If prompted, enter your credentials.\n\n - If you use a GitHub username and password, enter your\n GitHub username and password.\n\n - If you use two-factor authentication with GitHub,\n create and use a [personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line).\n\n8. In the **Clone a repo** dialog, paste the HTTPS URL for your GitHub repository.\n\n9. Click **Clone**.\n\nConfigure your managed notebooks instance with your GitHub user information\n---------------------------------------------------------------------------\n\n1. In JupyterLab, select\n **Git \\\u003e Open Git Repository in Terminal**\n to open a Git terminal window.\n\n2. In the Git terminal window, enter the following commands to configure\n your Git username and email:\n\n ```scdoc\n git config --global user.name \"YOUR_NAME\"\n git config --global user.email \"YOUR_EMAIL\"\n ```\n3. If your GitHub account requires SSH authentication, complete\n the following steps to connect your account:\n\n 1. From your Git terminal in your managed notebooks\n instance, follow GitHub's\n [instructions for generating a new SSH key](https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent).\n\n 2. Follow the\n [instructions for adding that SSH key to your GitHub\n account](https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account).\n\n4. Close the Git terminal window.\n\nAdd your committed files to your GitHub repository\n--------------------------------------------------\n\n1. Your managed notebooks instance shows your repository\n as a new folder. If you don't\n see your cloned GitHub repository as a folder, click the **Refresh File\n List** button.\n\n2. Double-click your repository folder to open it.\n\n3. Add a new notebook to your managed notebooks instance.\n\n To add a notebook file, you can use the menu or the Launcher. \n\n ### Menu\n\n 1. To add a new notebook file from the menu, select\n **File \\\u003e New \\\u003e Notebook**.\n\n 2. In the **Select kernel** dialog, select the kernel for your new\n notebook, for example, **Python 3** , and then click **Select**.\n\n Your new notebook file opens.\n\n ### Launcher\n\n 1. To add a new notebook file from the Launcher, select\n **File \\\u003e New \\\u003e Launcher**.\n\n 2. Click the tile for the kernel you want to use.\n\n Your new notebook file opens.\n4. Rename your new notebook file.\n\n ### Menu\n\n 1. Select **File \\\u003e Rename notebook** . The\n **Rename file** dialog opens.\n\n 2. In the **New name** field, change `Untitled.ipynb` to something\n meaningful, such as `install.ipynb`.\n\n 3. Click **Rename**.\n\n ### Launcher\n\n 1. Right-click the `Untitled.ipynb` tab and then click\n **Rename notebook** . The **Rename file** dialog opens.\n\n 2. In the **New name** field, change `Untitled.ipynb` to something\n meaningful, such as `install.ipynb`.\n\n 3. Click **Rename**.\n\n5. Select the **Git** tab. Your new notebook is listed in the **Untracked**\n grouping.\n\n6. To add the new notebook as a file for your GitHub repository, right-click\n the new notebook and select **Track** . On the **Git** tab, your notebook\n is now added to the **Staged** grouping.\n\n7. To commit your new notebook to your GitHub repository, on the **Git** tab,\n add a commit comment and click **Commit**.\n\n8. To open a Git terminal window, select\n **Git \\\u003e Open Git repository in terminal**.\n\n9. In the Git terminal window, enter the `git push` command.\n\n - If you use a GitHub username and password, when prompted, enter your\n GitHub username and password.\n\n - If you use two-factor authentication with GitHub,\n [create a personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line)\n to use.\n\n When the `git push` command completes, your committed files are in\n your GitHub repository."]]