首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不推送LFS文件

不推送LFS文件
EN

Stack Overflow用户
提问于 2021-12-21 20:27:59
回答 1查看 1.3K关注 0票数 0

我试着做一次LFS,但这似乎对我不起作用

我使用了以下命令

代码语言:javascript
复制
git lfs install 
git lfs track "X" 
git add .gitattributes
git commit -m "LFS added"
git push origin main

这似乎不起作用,所以我引用了SO上的一个主题,并使用了以下评论

代码语言:javascript
复制
git config --global lfs.allowincompletepush true
git lfs push --all origin main

在又一次用力之后,这种方法似乎也不起作用,所以我试了一下:

代码语言:javascript
复制
git config --global lfs.contenttype 0

还没解决?有什么想法吗?

对那些疑惑的人来说是错误的:

代码语言:javascript
复制
remote: Resolving deltas: 100% (11082/11082), done.
remote: error: Trace: a0c4773907c1208cb55f235c3169f15af2f3bf0000300aba7f3a687ffd0589e1
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Library/ArtifactDB is 128.00 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
To https://github.com/JannickOste/Camelot2D
 ! [remote rejected]   main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/JannickOste/Camelot2D'
EN

Stack Overflow用户

发布于 2021-12-22 01:14:12

git lfs track不会导致已经提交的文件被转换为LFS文件。它只对在运行命令后添加到索引或提交的文件产生影响。

如果要更改历史记录,则需要运行git lfs migrate import --everything --include='X' (其中X是所需的文件模式)。

请注意,您应该禁用lfs.allowincompletepush,因为如果您不小心,您最终可能无法推送数据,如果没有其他副本,您可能会遇到数据丢失。

票数 1
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70441254

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档