githubcommit is a jupyter notebook extension enabling users push ipython notebooks to a git repo. The git button gets displayed in the notebook toolbar. After saving any notebook the user can push notebook to pre-specified git repository. There are few environment variables that must be exported. Currently this extension supports commits to a single github repo defined in environment variable but in the long run need help to modify this extension allowing user to select his repo and branch.
You can currently install this directly from git:
pip install git+https://github.com/sat28/githubcommit.git
jupyter serverextension enable --py githubcommit
jupyter nbextension install --py githubcommit --user
To enable this extension for all notebooks:
jupyter nbextension enable githubcommit --user --py
I have made this short video in which I install the extension from scratch (click on the image)-
GIT_PARENT_DIR
GIT_PARENT_DIR
directoryexport GIT_PARENT_DIR=~
export GIT_REPO_NAME=gitjupyter
export GIT_BRANCH_NAME=master
export GIT_USER=sat28
export GIT_EMAIL=anand.shaleen@gmail.com
export GITHUB_ACCESS_TOKEN=#access-token from github developer settings
export GIT_USER_UPSTREAM=sat28
Thanks to https://github.com/Lab41/sunny-side-up for laying the foundation of this extension.
Thanks to https://github.com/justvarshney for support.