Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should ipynb checkpoints be stored in Git?

As the title says: I'm checking a Jupyter notebook into a GitHub repo, should I store the .ipynb_checkpoints folder in GitHub too, or are they best .gitignored and kept locally?

I'm not really sure what they are for, so I don't know whether to include them or not.

like image 988
Richard Avatar asked Mar 30 '16 10:03

Richard


People also ask

Where are Jupyter notebook checkpoints stored?

As a side note, the checkpoint file is located within a hidden folder named . ipynb_checkpoints . This folder is located within the same folder as the initial . ipynb file.

Can you put Ipynb on GitHub?

Make a new repository into Github. Click Add Files -> Create New File. Browse through your directory and upload your file (example filename: GeeksForGeeks. ipynb) and click Open.

Can Jupyter notebook work with Git?

It is a very nice feature of Jupyter notebooks that cell outputs (e.g. images, plots, tables with data) can be stored within notebooks.


1 Answers

The checkpoints are similar files as the original notebooks but are only updated on a manual save. The original notebooks are updated with autosave and when manually saving (thanks @Thomas K).

The question to you is if you want to share your manual saves with your collaborators. I prefer not to share those because git already provides the functionality to go back to an older version.

Also, I use https://www.gitignore.io/ to create .gitignore files and according to them the checkpoints are temporary data.

like image 71
Pieter Avatar answered Sep 21 '22 15:09

Pieter