我在使用git lfs从 git origin 提取代码时遇到一些问题。我们已将 git-lfs 集成到我们的存储库中,当我们发出git pull命令时,git-lfs 用于拉取存储库源代码控制中的 jar 文件。我现在尝试拉下一个分支,其中包含 jar 更改,并且收到以下错误:
Error downloading object: ourRepo/ourRepo/Jars/ourJar.jar (8b200ef): Smudge error: Error downloading ourRepo/ourRepo/Jars/ourJar.jar (8b200efda95c6d6f2672dc23b5aae0abb9e60b303705c9f65b785ef9d80691d1): LFS: Client error: https://api.media.atlassian.com/file/2897df4a-ce54-4e69-9817-910758ed6355/binary
Run Code Online (Sandbox Code Playgroud)
有没有人遇到过这个问题,解决方案是什么?
我有一个启用了 git-lfs 的现有存储库(在 GitHub 上),其中包含 1GB 的文件。出于带宽原因,我想停止使用 GitHub 并开始使用公司网络上托管的 LFS 存储库。有谁知道如何在 git lfs 存储库之间迁移?
我可以转换为“没有 git-lfs 的普通存储库”,然后返回 git-lfs,但必须有一种方法可以做到这一点,而无需重写历史记录,只需复制文件,对吗?
谢谢!
我们有一个本地 git 服务器,带有 LFS 文件。我们计划将所有内容迁移到 MS Azure DevOps 上。经过一些研究,我读到建议进行“镜像”克隆,以拥有所有内容(至少是标签):
git 克隆 --mirror
然后,由于我有一些 LFS 文件,我也想获取它们:
git lfs fetch --all
但我收到这个错误:
Error: Failed to call git rev-parse --git-dir --show-toplevel: "fatal: this operation must be run in a work tree\n"
Not in a git repository.
Run Code Online (Sandbox Code Playgroud)
对于我正在阅读的内容, git lfs fetch 在存储库上不起作用bare(并不是说我知道这是什么,但我认为它与该--mirror选项有关。
所以我的问题是:我应该怎么做才能将所有内容转移到这个新存储库?(此后本地服务器将关闭)。
谢谢
所以我在我的rails项目中使用了node,并且有一个文件,github不会推送,因为它超过了100MB:
node_modules/puppeteer/.local-chromium/linux-856583/chrome-linux/chrome
我做到了
git lfs install
git lfs track "/node_modules/*"
git add .gitattributes
git add .
git commit -am "commit after lfs"
git push
Run Code Online (Sandbox Code Playgroud)
但它仍然抛出同样的错误:
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: d06553d5a0051916cd0d22b28f55bb105cb07d442b1a6f6133e51e888e22b221
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File node_modules/puppeteer/.local-chromium/linux-856583/chrome-linux/chrome is 274.64 MB; this exceeds GitHub's file size limit of 100.00 MB
Run Code Online (Sandbox Code Playgroud)
我还使用 git lfs ls-files 检查,我看到该文件我在这里做错了什么?
我在这里看到代码
https://gist.github.com/Srfigie/77b5c15bc5eb61733a74d34d10b3ed87
#Image
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.ai filter=lfs diff=lfs merge=lfs -text
*.tif filter=lfs diff=lfs merge=lfs -text
Run Code Online (Sandbox Code Playgroud)