2016-04-25 315 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

安裝它,它像一個魅力(重新啓動控制檯後) –