Colab and Github Workflow

A Colab notebook can be opened from Github, but it will open in Colab as a new read-only version rather than the original notebook.

To illustrate, here is an example notebook created in Colab:

../_images/Colab-Original.png

Here is a copy of the notebook saved to an example Github repository:

../_images/Colab-Github.png

And here is the read-only copy that results from clicking the “Open in Colab” link in Github:

../_images/Colab-Read-Only.png

Hence, the best way to work on a notebooks and keep it updated on Github is to open it from Google Drive and save a copy to Github each time you are finished working. This should be your workflow:

  1. Create a notebook in Google Colab.

  2. Work on your notebook.

  3. Save a copy to your team’s Github repository and close the notebook.

  4. Open the notebook from Google Drive.

  5. Return to step 2.