gpt4 book ai didi

git - 即使在 git lfs 安装后也无法进行 git Push

转载 作者:行者123 更新时间:2023-12-02 19:23:53 40 4
gpt4 key购买 nike

场景1:

  • 尝试在 github 中推送大小 > 100MB 的文件
  • 文件 > 100MB 不允许推送。有效错误。同意
  • 好的,使用 git lfs
  • 还是同样的错误
  • 这里出了什么问题
  • 以下与场景 1 相关的图片

场景 2:

  • 克隆了一个新的存储库
  • 创建了一个 > 100 MB 的新文件
  • 尚未推送。我知道这会是一个问题
  • 进行大文件的 git lfs install&track 并进行 git add&commit
  • 现在如果我 git Push,成功,一切都好。没有问题。我可以在github中看到这个大文件
  • 查看https://github.com/sivakumar-j-secondary-ac/scenario-2

so What's wrong in the "Scenario 1", if git lfs is working in scenario-2

enter image description here

enter image description here

enter image description here

enter image description here

最佳答案

您必须使用以下命令将它们显式迁移到 Git LFS

git lfs migrate import --include="path_to_file

而不仅仅是跟踪。当存储库中存在文件时,跟踪不起作用。

希望这有帮助。

关于git - 即使在 git lfs 安装后也无法进行 git Push,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62649230/

40 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com