【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的使用;

 

posted on 2020-12-02 07:42  鹅要长大  阅读(3779)  评论(0编辑  收藏  举报

导航