Skip to main content

Use JupyterLab's GitLab Extension

If enabled for your account, you can use JupyterLab's GitLab extension to provide version control for your code in JupyterLab. To request the GitLab extension, create a Safe Haven case in the LiveRamp Community portal.


Jupyter Notebook does not support the GitLab extension.

The following instructions provide examples of how to use the GitLab extension and assume that you have experience using the Git source control system for tracking file changes. For more information about Git, see the "git" website.

Procedure. To use the GitLab extension in JupyterLab:
  1. Open the Analytics Environment virtual machine desktop and sign in using two-factor authentication.

  2. From the virtual machine desktop landing page, click the appropriate JupyterLab tile.



    If your account has access to more than one tenant, choose the tile for the desired tenant account.

    JupyterLab shows the following repositories:

    • personal-repository: Only you have permission to view code that you write to this folder.

    • shared-repository: If you write your code to this tenant-level folder, all the users in this tenant can view your code.



    The following default branches of the shared-repository are protected, so you cannot push code directly to them:

    • main

    • origin/head

    • origin/main

    You can create branches of the shared-repository, commit code to them, and use them to share code with other users.

  3. Click and open the shared-repository and then click the GitLab extension icon GitLab-Extension-Icon.png.

  4. To pull the latest changes from GitLab, click the download icon.

  5. To share files in the shared-repository, create a branch because its main branch is protected. You cannot push code directly to its main branch.

    1. Click Manage branches and tags.

    2. On the Branches tab, click New Branch.

    3. Enter a name for the branch and then click Create Branch.

      You and other users can now share code to the shared-repository.

  6. Click the Changes tab to add files to be tracked.



    Do not track files that end with _checkpoints because JupyterLab generates these automatically when it saves files.

  7. To commit the tracked files, enter a description and click COMMIT. Enter your user name and email if needed.

  8. To view any differences between what you have changed and what is in GitLab, click the Diff icon.

  9. To push your changes to GitLab, click the upload icon.

  10. To track changes to your files, click the History tab and view who changed what file when.

  11. For another user to pull any changes that you want to share with them, they need to click the download icon GitLab-Pull-Icon.png.