ipynb检查点是否应该存储在Git中? [英] Should ipynb checkpoints be stored in Git?

查看:349
本文介绍了ipynb检查点是否应该存储在Git中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所述:我正在将Jupyter笔记本检查到GitHub存储库中,我是否也应该将.ipynb_checkpoints文件夹存储在GitHub中,还是最好的.gitignore d并保存在本地?

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.

推荐答案

检查点与原始笔记本相似,但仅在手动保存时更新.原始笔记本会通过自动保存和手动保存进行更新(感谢@Thomas K).

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).

您遇到的问题是,是否要与协作者共享您的手动保存.我不愿分享这些内容,因为git已经提供了返回旧版本的功能.

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.

此外,我使用 https://www.gitignore.io/创建.gitignore文件,并根据它们创建检查点是临时数据.

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

这篇关于ipynb检查点是否应该存储在Git中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆