gpt4 book ai didi

git - 此存储库已针对 Git LFS 配置,但在您的路径中未找到 'git-lfs'

转载 作者:IT王子 更新时间:2023-10-29 00:58:29 25 4
gpt4 key购买 nike

请帮助我理解以下错误消息的含义以及如何遵守其要求。

我想复制一个现有的本地 git 仓库;然后将该副本推送到新创建的远程。

但是我得到以下错误:

This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.

我在收到此消息之前立即使用的代码是:

# create new git repo at https://github.com/username/foo-bar.git
cp -r OldProject/ NewProject/
cd NewProject/
git remote remove origin # Remove prior origin from copy operation
git init
git remote add origin https://github.com/username/foo-bar.git
git add -A
git commit -m "first commit"
git push -u origin master

我做错了什么,我该如何解决?请帮助我理解上述错误消息的含义以及如何遵守其要求。

最佳答案

This repository is configured for Git LFS but 'git-lfs' was not found on your path

LFS 是“大文件存储”,是 git 的一个扩展,它将大文件保存在实际存储库之外,因此它不会变慢。当错误提示“未在您的路径中找到”时,这意味着 git 正在寻找您尚未安装的程序。您可以使用 https://git-lfs.github.com/ 上的说明安装它.

顺便说一句,钩子(Hook)是当您执行某些操作时 git 运行的一些代码。它们存储在存储库中的 stash 目录 .git/hooks 中。

关于git - 此存储库已针对 Git LFS 配置,但在您的路径中未找到 'git-lfs',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36848741/

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