首页 > 解决方案 > 将丢失的文件推送到 git lfs

问题描述

不幸的是,我在.gitattributes几周前(以及提交和推送)引入了一个错误。因此.gitignore,我的项目的子文件夹被假定在 git lfs 上。但由于某种原因,它从未被推到那里。.gitattributes我通过新的提交纠正了错误。现在,一切都很好,除了我无法签出旧提交,它假定文件存在于 git lfs 中。我收到以下错误:

Error downloading object: testdata/.gitignore (42e0b88): Smudge error: Error downloading testdata/.gitignore (42e0b88b4a1842297d2671cd534dc6130a7a8fc4806bc7ef9bab82d38df32360):[42e0b88b4a1842297d2671cd534dc6130a7a8fc4806bc7ef9bab82d38df32360] Object does not exist on the server or you don't have permissions to access it: [404] Object does not exist on the server or you don't have permissions to access it

我该如何解决?有没有办法手动推送文件并给它正确的ID?或者我可以回顾性地修复错误的提交吗?

标签: gitgit-lfsgit-history

解决方案


推荐阅读