python - 如何从 git 中排除 Jupyter 笔记本检查点
问题描述
我的 .gitignore 文件如下:
.ipynb_checkpoints
*/.ipynb_checkpoints/*
但是当我执行 git status 时,我仍然会跟踪检查点。
C:\python_git\python3>git status
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: Lists/.ipynb_checkpoints/List Basic Operations-checkpoint.ipynb
modified: Lists/List Basic Operations.ipynb
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
no changes added to commit (use "git add" and/or "git commit -a")
解决方案
推荐阅读
- user-interface - 是否有任何 OpenAL 效果 GUI 编辑器?
- javascript - 自动滚动到每个 div 暂停,然后继续移动
- rust - 如何在函数调用时显示编译器警告?
- java - 无法从代理调用 java 中的 openNTF 会话 - 版本 10.0.1
- python - 是否有一个 pandas 函数可以从累积和返回瞬时值?
- flutter - 如何在 Flutter 中进行可滚动拖放?
- machine-learning - 即使使用稀疏矩阵,SelectKBest 也会出现内存错误
- javascript - 如何在 React 中修复“无法读取未定义的属性‘setState’”
- wordpress - 尝试显示自定义字段
- java - 具有中期结果的漫长过程