该存储库为Git LFS配置,但在您的路径中找不到'git-lfs' [英] This repository is configured for Git LFS but 'git-lfs' was not found on your path

查看:5170
本文介绍了该存储库为Git LFS配置,但在您的路径中找不到'git-lfs'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



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



但是,我收到以下错误消息:


此存储库为Git LFS配置,但在您的路径中找不到'git-lfs'。如果您不再希望使用Git LFS,请通过删除.git / hooks / pre-push来删除此钩子。


代码I在获取此消息之前立即使用:

 #在https://github.com/username/foo创建新的git repo -bar.git 
cp -r OldProject / NewProject /
cd NewProject /
git remote remove origin#从复制操作中移除之前的起源
git init
git remote add origin https://github.com/username/foo-bar.git
git add -A
git commit -m第一次提交
git push -u原始大师

我做错了什么,我该如何解决?请帮助我了解上述错误消息的意义以及如何遵守其请求。 此存储库为Git LFS配置,但在您的路径中未找到'git-lfs'


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



顺便说一句,钩子是一些代码,当你执行一些操作时,git运行代码。它们存储在隐藏目录 .git / hooks 中。


Please help me understand what the below error message means and how to comply with its request.

I want to copy an existing local git repo; then push that copy to a newly created remote.

But I get the following error:

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.

The code I used immediately prior to getting this message is:

# 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

What am I doing wrong and how can I fix it? Please help me understand what the above error message means and how to comply with its request.

解决方案

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

LFS is "Large File Storage," an extension for git that keeps large files outside of the actual repository so it doesn't become slow. When the error says "not found on your path," it means git was looking for a program that you don't have installed. You can install it using the instructions on https://git-lfs.github.com/.

A hook, by the way, is a bit of code git runs when you do some action. They are stored in the repository, in the hidden directory .git/hooks.

这篇关于该存储库为Git LFS配置,但在您的路径中找不到'git-lfs'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆