【git基礎error】git clone之后無代碼只有.git


問題描述:

最近從git上下載DL模型和源碼,看到模型只有幾十k,就准備先clone模型文件再clone源碼,沒想到耽誤了一些功夫,clone之后只有.git,但沒有看到模型文件。

分析:

首先,一定要有權限,其次,一定要配置好git,特別是SSH KEY;

一般情況下,只需要clone就可以了,但是這次還需要其他的操作here;

1. git clone ssh://usrname@usremail:gitpro
2. cd gitpro
3. git branch -v
4. git checkout -b branch_name origin/branch_name
5. git pull

但是clone 模型文件的時候還出現其他錯誤(類似如下):

Downloading ***.bin (2.56 MB)
Error downloading object: ***.bin (*****): Smudge error: Error downloading ***.bin (*****): batch response: Post /objects/batch: 

Errors logged to *****\.git\lfs\objects\logs\20200818T095120.10423.log
Use `git lfs logs last` to view the log.
error: external filter git-lfs smudge -- %f failed 2
error: external filter git-lfs smudge -- %f failed
fatal: ***.bin: smudge filter lfs failed

對於DL models模塊,有一點特殊,因為里面都是大文件,暫時使用git lfs  和 nexus進行托管,因此需要安裝git lfs工具;

其實,系統已經安裝了git lfs工具,出現這個問題是因為沒有添加權限。

 

 

參考

1. 解決 git clone 后無代碼;

2. git lfs的使用;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM