Notebook Version Control

The Push into VCS & Pull from VCS functionality allows users to manage and maintain different versions of the same notebook at various stages of a project.

The Notebook Version Control functionality in Data Science Lab (DSLab) allows users to track, save, and synchronize notebook changes with a version control system (VCS), such as Git. Users can push modified notebooks to VCS, pull specific versions, and maintain a history of workflow changes, ensuring collaboration and consistency.

Note: Notebooks pulled from Git are automatically synchronized with the repository. Each pull overwrites the local file with the latest version, and version selection is not available for Git-pulled notebooks.

Using Version Control for User-Created Notebooks

Navigation path: Data Science Lab > Workspace > Repo Folder > Notebook > Context Menu > Push/Pull to VCS

Steps to Push a Notebook to VCS

  1. Select the Notebook file from the Workspace tab and open it.

  2. Modify the notebook script as needed.

  3. Click the Save icon to save the changes.

  4. A notification confirms that workflow changes have been saved.

  5. Open the Context Menu for the notebook.

  6. Click Push into VCS.

  7. The Push into the Version Controlling System drawer opens.

  8. Select the Version Control option.

  9. Provide a Commit Message describing the changes.

  10. Click Push.

  11. A notification confirms that the selected version of the notebook has been successfully pushed to VCS.

Steps to Pull a Notebook from VCS

  1. Open the Context Menu for the notebook with multiple versions in VCS.

  2. Click Pull from VCS.

  3. The Pull from the Version Controlling System drawer opens.

  4. Select the desired version using the checkbox.

  5. Click Pull.

  6. A notification confirms that the notebook has been pulled from VCS.

  7. Open the same notebook file from the Repo folder in the Workspace tab.

  8. A notification confirms that the workflow has started.

  9. Verify that the notebook script reflects the modifications from the pulled version.

Version Control for Notebooks Pulled from Git

  • When a notebook is pulled directly from Git, it differs from a notebook created locally by the user:

    • Click the Information option in the context menu for a Git-pulled notebook.

    • The notebook will be labeled Pulled from git.

    • Each pull overwrites the local notebook with the latest Git version.

    • Version selection is not available for Git-pulled notebooks.

Key Points

  • Push to VCS: Commits local changes and updates the remote repository.

  • Pull from VCS: Retrieves a specific version of a notebook from the repository.

  • Git-Pulled Notebooks: Always fetch the latest version; previous versions cannot be selected.

  • Notifications: Confirm all push, pull, and save actions to ensure changes are recorded.