Datalore 2024.2 Help

Use Terminal for Git integration

Use Terminal to clone Git repositories and edit their contents.

Clone a Git repository using Terminal

You can use the Terminal tool.

  1. In the editor, go to Main menu | Tools | Terminal. This opens a terminal session.

  2. Use Git CLI commands to clone a repository or get a fresh version of it in your notebook or workspace files.

  3. (Optional) To use the repository in all the notebooks of the workspace, clone it to Workspace files.

  4. (Optional) To access the repository contents from the notebook, import the necessary functions. Datalore provides you with code completions and documentation popups for imported Python modules.

To make an edited init.sh script available across the whole workspace, do the following using the Attached data tool:

  • Make sure your Workspace files are attached to the notebook.

  • Move the init.sh file from Notebook files to Workspace files.

Find more details about this in Upload files.

Edit Git repository contents in Datalore

If you want to edit Python scripts or files available in your Git repository, you can clone the repository to your Attached data in one of the following ways:

  • Select Main menu | Tools | Terminal. This will open a terminal session for you to execute the required Git CLI commands.

  • Use Python magic commands directly inside notebook’s code cells.

After you’ve cloned the repository to your Attached data, you will be able to edit file contents collaboratively. For Python files, you will be provided with the code completion and syntax highlighting assistance. To use the updated functions in your notebook, make sure to restart the kernel or use an autoreload extension:

... %load_ext autoreload %autoreload 2 ...
Last modified: 29 May 2024