2016-04-25 1756 views
3

请帮我理解下面的错误消息意味着什么以及如何遵守其请求。该存储库为Git LFS配置,但在您的路径中找不到'git-lfs'

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

,但我得到了以下错误:

# 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. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.

我立即收到此消息是之前使用的代码?请帮助我了解上述错误消息的含义以及如何遵守其要求。

+0

您是否尝试过做错误信息?我的意思是'通过删除.git/hooks/pre-push来删除这个钩子。' – Polygnome

+0

@Polygnome:不,因为我不知道这意味着什么。也许我应该在我的问题上做得更清楚。你能帮我理解错误信息的含义以及如何做到这一点吗? – Mowzer

+0

你现在不是如何删除文件? – Polygnome

回答

10

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

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

顺便说一句,钩子是你做某个动作时运行的一些代码。它们存储在存储库中的隐藏目录.git/hooks中。

+1

我使用https://git-lfs.github.com/上的说明来安装它,但我仍然收到错误消息。 –

+0

安装它,它像一个魅力(重新启动控制台后) –