Is there a way to integrate git with Jupyter and have a version control over the notebooks created?
Asked Answered
A

7

27

I have hosted jupyterhub on a server and added many users into it. I want the users to have an option of version control for their work. So is there any way to add a git kernel or extension do have this done?

Ankledeep answered 22/1, 2016 at 7:48 Comment(1)
The current version offers some "checkpoint" mechanism, I guess that can be modified to use git somehow...Goodrich
C
3

You can version jupyter notebooks directly using kyso.io (disclaimer: I founded kyso).

Kyso supports the Jupyter format fully so you can render them nicely, and have proper versioning, diffing and merging of .ipynb files.

Cyprinodont answered 26/6, 2017 at 9:20 Comment(0)
C
3

Have a look at " nbdime " project, Solves all the issues in visualizing the diff in big notebook

Cuyler answered 9/5, 2018 at 10:35 Comment(0)
A
2

Ipython notebook files (*.ipynb) are actually view-able on Github

You can simply add the notebook files to the Github repo like any other file, and use all of Git's version control features.

When I am working with people on a shared project, we have a single repo for the project and individually check in code using Git.

Axil answered 6/8, 2016 at 2:22 Comment(0)
B
2

JupyterHub has the ability to start Unix command line terminals via New, Terminal. git is available there via the command line interface. You may have to do some measure of git configuration to push out to github, etc.

Boxwood answered 3/7, 2017 at 17:41 Comment(1)
awesome, this is what I needed!Gerta
V
2

Edit your notebook in Visual Studio Code using JupyterHub as a remote server and export to python when you are done.

Vide answered 9/10, 2019 at 4:44 Comment(2)
Hum, this is not an answer to the question. It asks about jupyter-git integration. Your proposal is not an integration.Zaratite
@Zaratite this isn't a direct answer to the question, but a possible solution for the problem. Maybe somebody will find useful. I added another link to improve it.Vide
P
2

Use jupyterlab-git: https://github.com/jupyterlab/jupyterlab-git

It provides git integration for Jupyterlab:

enter image description here

Also see related question: How to init content of notbooks / working directory in Jupyterhub/Jupyterlab?

Potentate answered 22/10, 2020 at 16:1 Comment(0)
H
1

You can use this jupyter extension. It will enable you to directly upload your ipython notebooks to github.

https://github.com/sat28/githubcommit

I have also created a video demonstrating the steps - youtube link

Henryson answered 15/1, 2018 at 15:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.