Notebook to GitHub

I do not want runtime check-in notebook to Github. i.e. no code cell output checked-in to GitHub. I appreciate someone can suggest me the configure in Jupyet notebook, lab, or hub.

The way I do it now is to use Jupytext to manually / automatically save the notebook as text format - such as RMarkdown - and I only put the RMarkdown files into version control.

A tool such as nb-clean could also be used as a pre-commit hook or in continuous integration. There is this GitHub Action for ensuring clean notebook output too.

1 Like