【git】Ubuntu操作系统上安装Git LFS

一、场景

    简单来讲、这玩意就是下载大文件用的

 

二、官网

https://www.atlassian.com/git/tutorials/git-lfs#what-is-git-lfs

 

三、安装

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install

 

四、用法

使用git lfs --help

复制代码
EXAMPLES
       To get started with Git LFS, the following commands can be used.

        1. Setup Git LFS on your system. You only have to do this once per
           user account:

               git lfs install

        2. Choose the type of files you want to track, for examples all ISO
           images, with git-lfs-track(1):

               git lfs track "*.iso"

        3. The above stores this information in gitattributes(5) files, so
           that file needs to be added to the repository:

               git add .gitattributes

        4. Commit, push and work with the files normally:

               git add file.iso
               git commit -m "Add disk image"
               git push
复制代码

常用命令

  • 显示当前被 lfs 追踪的文件列表
git lfs ls-files 
  • 查看现有的文件追踪模式
git lfs track 
  • 取消 git lfs 对某文件的追踪
git lfs untrack "\*xx.a" 
  • 查看当前 git lfs 版本
git lfs version 
  • 取消 LFS 的全局配置
git lfs uninstall

 

 

 

 

 

参考链接:

https://zhuanlan.zhihu.com/p/623818862

https://www.atlassian.com/git/tutorials/git-lfs#what-is-git-lfs

 

posted @   代码诠释的世界  阅读(492)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2023-06-12 【zipfile】python基于zipfile的暴力破解加密zip文件
2023-06-12 【vim】批量替换文件内容
点击右上角即可分享
微信分享提示