Should ipynb checkpoints be stored in Git?

GitJupyter Notebook

Git Problem Overview


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.

Git Solutions


Solution 1 - Git

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRichardView Question on Stackoverflow
Solution 1 - GitPieterView Answer on Stackoverflow