无法忽略 DVC 中的 .DS_Store 文件
Unable to ignore .DS_Store files in DVC
我使用 DVC 来跟踪我的媒体文件。我使用 MacOS,我希望 DVC 忽略“.DS_Store”文件。根据 DVC 文档,我可以用 .dvcignore 实现它。我用“.DS_Store”规则创建了 .dvcignore
文件。但是每次创建“.DS_Store”时 dvc status
仍然说内容已更改
这是重现我的问题的小测试:
$ git init
$ dvc init
# create directory to store data
# and track it's content with DVC
$ mkdir data
$ dvc add data
# Ignore .DS_Store files created by MacOS
$ echo ".DS_Store" > .dvcignore
# create .DS_Store in data dir
$ touch "data/.DS_Store"
如果我对 DVC 文档的理解正确,那么 dvc status
应该打印类似 "Pipeline is up to date. Nothing to reproduce" 的内容。但是 dvc status
给我:
data.dvc:
changed outs:
modified: data
我怎样才能真正忽略“.DS_Store”文件?
更新: .dvcignore 支持在最新版本中得到显着改进,问题不再相关。
.dvcignore
的当前实施非常有限。阅读更多内容 here。
请在此处提及您对此功能感兴趣 - https://github.com/iterative/dvc/issues/1876。这将有助于我们的团队正确地确定问题的优先级。
目前可能的解决方法是使用其中一种方法 - How to stop creating .DS_Store on Mac?
这似乎是从 fixed/implemented!
开始的
$ dvc init --no-scm
...
$ mkdir data
$ dvc add data
WARNING: 'data' is empty.
Saving information to 'data.dvc'.
$ echo ".DS_Store" > .dvcignore
$ touch "data/.DS_Store"
$ tree -a data
data
└── .DS_Store
0 directories, 1 file
$ dvc status
Data and pipelines are up to date.
我使用 DVC 来跟踪我的媒体文件。我使用 MacOS,我希望 DVC 忽略“.DS_Store”文件。根据 DVC 文档,我可以用 .dvcignore 实现它。我用“.DS_Store”规则创建了 .dvcignore
文件。但是每次创建“.DS_Store”时 dvc status
仍然说内容已更改
这是重现我的问题的小测试:
$ git init
$ dvc init
# create directory to store data
# and track it's content with DVC
$ mkdir data
$ dvc add data
# Ignore .DS_Store files created by MacOS
$ echo ".DS_Store" > .dvcignore
# create .DS_Store in data dir
$ touch "data/.DS_Store"
如果我对 DVC 文档的理解正确,那么 dvc status
应该打印类似 "Pipeline is up to date. Nothing to reproduce" 的内容。但是 dvc status
给我:
data.dvc:
changed outs:
modified: data
我怎样才能真正忽略“.DS_Store”文件?
更新: .dvcignore 支持在最新版本中得到显着改进,问题不再相关。
.dvcignore
的当前实施非常有限。阅读更多内容 here。
请在此处提及您对此功能感兴趣 - https://github.com/iterative/dvc/issues/1876。这将有助于我们的团队正确地确定问题的优先级。
目前可能的解决方法是使用其中一种方法 - How to stop creating .DS_Store on Mac?
这似乎是从 fixed/implemented!
开始的$ dvc init --no-scm
...
$ mkdir data
$ dvc add data
WARNING: 'data' is empty.
Saving information to 'data.dvc'.
$ echo ".DS_Store" > .dvcignore
$ touch "data/.DS_Store"
$ tree -a data
data
└── .DS_Store
0 directories, 1 file
$ dvc status
Data and pipelines are up to date.