zoukankan      html  css  js  c++  java
  • GIT LFS 使用笔记

    一、背景

      由于git上传文件大小受限,所以我们需要使用GIT LFS对大小超过一定上限的大文件进行处理。

    二、安装

      linux上安装参见 https://askubuntu.com/questions/799341/how-to-install-git-lfs-on-ubuntu-16-04

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

      在我的ubuntu16.04上我一直卡在第一条命令,所以我选择的是windows版GIT LFS(https://git-lfs.github.com/)

      下载完git-lfs-windows-v2.5.2.exe后双击,按照步骤进行安装。然后执行 git lfs install

    三、使用,参考https://blog.csdn.net/code_segment/article/details/78597416 

      # Add all zip files through Git LFS
      $ git lfs track "*.zip"

      $ git add .gitattributes

      $ git add my.zip
      $ git commit -m "add zip"

      $ git lfs ls-files
      my.zip

      $ git remote add origin https://github.com/Agzs/gopath.git

      $ git push origin master

      在这里一定要用git lfs ls-files查看一下,我用直接track文件的方式就没有在这里显示出我要托管的文件。

  • 相关阅读:
    最长公共子序列(LCS)
    数组分割问题
    Trie树
    BitMap(比特位)
    KMP算法——字符串匹配
    排序算法
    概率问题
    【设计模式】——访问者模式
    【设计模式】——解释器模式
    【设计模式】——享元模式
  • 原文地址:https://www.cnblogs.com/lucifer1997/p/9877535.html
Copyright © 2011-2022 走看看