当前位置:   article > 正文

Windows上Git LFS的安装和使用_window10安装git lfs

window10安装git lfs

到Git LFS官网下载

传送门

初始化GitHub LFS和Git仓库

在仓库目录中运行:

git lfs install
  • 1

在这里插入图片描述
再运行:

git init
  • 1

在这里插入图片描述

跟踪大文件

git lfs track "*.zip"
  • 1

在这里插入图片描述

添加并提交文件

git add .
git commit -m "Add large files"
  • 1
  • 2

上传到我的github

  1. 配置Git用户名和邮箱
git config --global user.name "Your Name"
git config --global user.email you@example.com
  • 1
  • 2
git config --global user.name "seamoon224"
git config --global user.email 1375144937@qq.com
  • 1
  • 2
  1. 在github上创建/指定一个远程仓库,用于存放传送的文件
  2. 添加远程仓库地址
git remote add origin <your-repository-URL>
  • 1
  1. 推送到GitHub
git push -u origin master
  • 1

在这里插入图片描述
推送失败后再次推送,成功运行了。(好怪)
其实最终还是失败了,因为git LFS空间不足,提示信息:
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
在这里插入图片描述
只能在github上购买1 pack,进入settings,查看plans and usage,拉到最下面,可以看到git LFS data:
在这里插入图片描述
可以点击add pack进行购买,然后重新上传。成功!!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/412192
推荐阅读
相关标签
  

闽ICP备14008679号