I’ve spent most of my day trying to get GitHub working in Jupyter Notebooks, but I keep running into friction at nearly every step. It feels surprisingly difficult for something that seems like it should be a core part of the workflow.
For context, I’ve spent over 10 years in industry, where source control is a foundational part of software development. So, it’s a bit jarring to see Git not more directly integrated into Jupyter or JupyterHub environments.
I’m curious: is there a reason why Git/GitHub isn’t treated as a first-class citizen in the Jupyter ecosystem?
Would appreciate any insights or recommendations from others who’ve dealt with this.
Jupyter Notebook has . ipynb files and GitHub has index.html deployments.Even index.html file can have cells where you can run codes like Jupyter Notebook that might deploy it to GitHub.
Hi @nu11, it was not clear what you are trying to do.
Git primarily version control plain text files. IPython selected JSON as the format to store notebooks. JSON has the advantage of being plain text and a versatile standard. Unfortunately, diff between the plain text representation of two JSONs are horrible to read.
Git allows you to provide your own “diff” implementation, read more at git-difftool. A couple of projects were developed to provide the “diff” between notebooks, see nbdime and nbdiff (archived).
is there a reason why Git/GitHub isn’t treated as a first-class citizen in the Jupyter ecosystem?
Are you talking about Jupyter Lab not having a Git plugin? You should test jupyterlab-git.