1

我们使用 git lfs 向我们的 git 存储库添加了一些 png。不知何故出了点问题,几个文件有错误的斜线条目

data/images\\picture1.png
data/images\\picture2.png

真实文件存在并且工作正常

data/images/picture1.png
data/images/picture2.png

现在如果我拉,我得到一个错误

$ git.exe pull --progress --no-rebase -v "origin"
From bitbucket.org:USER/REP
= [up to date]      master     -> origin/master
Pointer file error: Unable to parse pointer at: "data/images\\picture1.png"

我已经尝试过 git rm 和 gc 但没有运气。有没有办法直接从 git DB 中删除这些条目?

问题出现在 Windows、Linux 和 Mac 上

编辑

运行 git ls-files,我可以看到列表中的文件,类似于

  data/images/picture0.png
  "data/images\\picture1.png"
  "data/images\\picture2.png"
  data/images/picture3.png

如果我尝试 git rm 各种口味(引号,无引号,--force,--cache,--dry-run),我总是收到错误

fatal: pathspec '"data/images\\picture1.png"' did not match any files
4

1 回答 1

1

我们最终从头开始重新创建存储库,问题自行消失了。这可能是由于当前影响 git LFS 的众多问题之一。

于 2017-02-25T10:33:10.810 回答