Git Gitee超100M解决

LFS

   LFS工具,可以由官网下载。安装路径为:

{git路径}/git/binGit LFS

操作步骤

   这里主要说LFS的操作,其余步骤省略~
1. 初始化git仓库
   这里和git的操作一样

2. 初始化LFS

 git lfs install

3. 选择大文件
   这里可以使用多种方式(*表示所有文件):

$ git lfs track "*"
$ git lfs track "*.pptx"
$ git lfs track "ABC/*.pptx"
  1. 提交.gitattributes
$ git add .gitattributes
$ git commit -m '提交 .gitattributes 文件'
$ git push origin master(如果提交不了,后面可以加一个-f)

5. 上传大文件
   这里和git的操作一样,选择文件,add,commit,push.

6. 报错1:

WARNING: Authentication error: Authentication required: LFS only supported repository in paid enterprise.

解决:

git config lfs.https://gitee.com/{your_gitee}/{your_repo}.git/info/lfs.locksverify false

   {your_gitee}/{your_repo}为远程仓库地址.

7. 报错2:

batch response: LFS only supported repository in paid enterprise.

解决:
   删除./git/hooks/pre-push文件

你可能感兴趣的:(▶,Tool,LFS,git)