Version Control

Details of our version control integration

Integrated Git Workflows

Saturn images come with git command line tools and a number of text editors, so you can always use git the way you would with any other unix installation. However Saturn also has some enhancements on top of standard version control tools that are tightly integrated.

  • Saturn provides Git tools integrated with Jupyter. We automatically snapshot your project so that users can easily role back to previous work. Saturn provides a Git diff and merge tool that seamlessly integrates viewing and merging Code and Notebooks.
  • Saturn Git tools promote a simple workflow. Users work in users branches that are always synchronized the the server. Users can use the GUI to push from their user branch into master, or pull from master into their user branch. Pull request based workflows are coming in the future. Every Saturn project is allocated a Git repository. Saturn users can invite collaborators to work on their project. Collaborators get access to the same hardware and image specs, as well as read write access to the underlying git repository backing the project.

Git Snapshots

Saturn snapshots your git repository periodically, and notifies you if you have code to push or pull. We setup a branch for you ${username}_master, which pushes to master. As you work, we commit to ${username}_master and push that branch to the server. The server always has a copy of your work.

Pushing and Pulling

In Saturn, you can push from your user branch into master, or pull from master into your user branch. When doing so, we provide an integrated diff and merge tool.

To open this tool from inside JupyterLab, click the small “git” circle in the bottom right-hand corner.

When that circle is green, it means that the current state of the project has been synced to the remote git repository. When it’s red, it means that some changes have been made. Click this circle to open the tool where you can review the diff, resolve conflicts, and merge your changes.

If you only have differences, and no conflicts, then the Finish button will be enabled, and clicking it will complete the push or pull. If you have conflicts in a text file, you can resolve those in the inline merge tool, and click Resolve If you have conflicts in a the a notebook, You can resolve those in the Notebook merge tool. We use jupytext to convert notebooks to text for diffs and merges. If you merge notebook changes with our UI, the outputs are cleared.