Skip to content

A git hook to prevent committing changes to Notebooks without cleaning their cell outputs.

Notifications You must be signed in to change notification settings

dhpour/Clean-Notebook-Commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Clean Notebook Commit

Ban your nnotebooks commits if their output cells are not empty.

Usage

Copy pre-commit to your repo hooks:

cat pre-commit >> .git/hooks/pre-commit

It doesn't change your notebook. It doesn't even git reset for you. It unstages files, rejects the commit and remindes you of your notebook cell outputs state for committing if you have forgotten to clean them.

Dependency

You need underscore-cli for using this hook.

npm install -g underscore-cli
underscore help

Similar works

For having more control over the process or manipulating the notebooks you can use nbstripout and nb-clean.

About

A git hook to prevent committing changes to Notebooks without cleaning their cell outputs.

Resources

Stars

Watchers

Forks

Languages