https://git-lfs.github.com/

1.从这个网址下载git-lfs-windows-amd64-1.1.0.exe,运行这个安装包

2.然后打开git bash

输入git lfs install

3.根据需求来处理大文件

$ git lfs track "*.wav"
Tracking *.wav

$ git lfs track "*.asset"
Tracking *.asset

这2个命令会在对应的目录下生成不同的.gitattributes文件

5.将生成的.gitattributes文件纳入版本控制

简直是给跪了,里面有2个超过10M的文件,居然push上去了

$ git push
Username for 'https://github.com': chucklu
Password for 'https://chucklu@github.com':
Counting objects: 563, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (549/549), done.
Writing objects: 100% (551/551), 29.73 MiB | 74.00 KiB/s, done.
Total 551 (delta 197), reused 0 (delta 0)
To https://github.com/chucklu/Tanks-Tutorial.git
6f935a1..121b1ee master -> master

6.

最新的版本安装,需要使用Choco

https://github.com/git-lfs/git-lfs#getting-started

  • Windows users can install from Chocolatey with choco install git-lfs.

似乎被墙了,直接去release界面,下载对应的安装包。

然后去C:\Program Files\Git LFS目录,替换掉对应的exe

7.如果之前某一个版本对文件追踪了,后续想要git push -f回滚的时候

Remote "origin" does not support the LFS locking API. Consider disabling it with:
$ git config 'lfs.http://lujuntao@192.168.1.91:8080/r/CSharp/IntelligentBuilding.git/info/lfs.locksverify' false

配置过后

$ git push -f
Total 0 (delta 0), reused 0 (delta 0)
To http://192.168.1.91:8080/r/CSharp/IntelligentBuilding.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'http://lujuntao@192.168.1.91:8080/r/CSharp/IntelligentBuilding.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

8.如果git clone之后才安装git lfs,而clone的版本库是用lfs的,那么需要git lfs fetch或者pull

git lfs的更多相关文章

  1. 如何使用 Git LFS 提交大文件?

    参考资料: An open source Git extension for versioning large files Git LFS的使用 如何使用 Git LFS 提交大文件? Git LFS ...

  2. 未安装git lfs导致git下载不完整,没有错误提示

    git clone命令没有报错. --recursive选项也加上了. cmake命令没有报错 make命令出错. 最后发现是因为没有安装git lfs,导致大文件下载不完整.最坑的是下载的时候也没有 ...

  3. GIT LFS 使用笔记

    一.背景 由于git上传文件大小受限,所以我们需要使用GIT LFS对大小超过一定上限的大文件进行处理. 二.安装 linux上安装参见 https://askubuntu.com/questions ...

  4. git lfs指令解决git status显示lib文件被修改,但是没有修改的问题。此时,git checkout没有用。

    $ git lfs migrate import --everything --include='*.LIB'https://github.com/git-lfs/git-lfs/issues/283 ...

  5. Git LFS的使用

    Git LFS的使用 Git LFS 是 Github 开发的一个 Git 的扩展,用于实现 Git 对大文件的支持 使用目的 在游戏开发过程中,设计资源占用了很大一部分空间. 像png,psd等文件 ...

  6. git lfs setpu(4)

    reference: https://packagecloud.io/github/git-lfs/installhttps://zzz.buzz/zh/2016/04/19/the-guide-to ...

  7. 更好的在 Git 项目中保存大文件(Git LFS 的使用)

    珠玉在前, 大家可以参考 Git LFS的使用 - 简书 为什么要用 Git LFS 原有的 Git 是文本层面的版本控制, 为代码这种小文件设计的, 保存大文件会导致 repo 非常臃肿, push ...

  8. apline无法向gitlab上传git lfs问题

    1 背景 在k8s中基于alpine做底层系统的容器进行git lfs push操作时,发现报错无法上传成功 Fatal error: Server error: http://git.ops.xxx ...

  9. Nexus OSS 3 搭建并配置使用 Docker & Git LFS 仓库

    转载自:https://cloud.tencent.com/developer/article/1010590 1.Nexus OSS 3 介绍 我们知道 Nexus 是一个强大的 Maven 仓库管 ...

随机推荐

  1. Haproxy配置文件详解

    #/usr/local/sbin/haproxy -f /etc/haproxy/haproxy.cfg -st `cat /var/run/haproxy.pid` ################ ...

  2. HDU 5245

    题目大意: 每次随机选择两个点,便把这两个点之间形成的子矩阵上的每一个方块涂色,问随机选择k次,整个m*n的矩阵中有多少个小方块被涂上了颜色 这道题不难,但自己智商实在捉急,一直想不出来... 因为这 ...

  3. codeforces 303 div2 E

    赤裸裸的最短路,需要注意下枚举过程就好了.直接贴上别人的代码,发现他的代码挺符合我的风格,以后就这样写了. #include <bits/stdc++.h> ]; ]; ]; ]; vec ...

  4. poj3648,2-sat求解

    关键是题意的理解,英语,有时候明明每个字都认识,但是还是理解错误!哎!!悲剧啊!题意啊! 这是关键!开始误理解为n对新娘郞,非也!是只有一对,其他是夫妇,理解后就好做了,建立图 是关键,怎么转化关系, ...

  5. Java使用IText(VM模版)导出PDF

    Java使用IText(VM模版)导出PDF: public String createPDF(ProjectManageBase projectManageBase) { Map map = new ...

  6. 佳能 imageclass mf40120

    加粉2612A 加粉方式: 完全拆解安装:在技术部 自已研究 简单拆开,一分为二,倒粉,然后,加分:一些其他单位 外部加粉,拆粉口外盖:一些其他单位

  7. DELPHI最新的产品路线图

    1)根据众多像您一样的客户要求,我们改为一年一个重大版本及更多更新.这个计划回到一年发布周期并提供额外的2或3个包含附加功能及支持期间发布的新版操作系统的更新. 2)在 RAD Studio  10. ...

  8. weblogic负载分发

    博客分类: weblogic 负载均衡的实现方式有很多种,这里只介绍三种相对来说成本较低的方案(维护成本以及费用成本)weblogic自带的proxy.apache.nginx 1.weblogic自 ...

  9. 【APUE】线程与信号

    每个线程都有自己的信号屏蔽字,但是信号的处理是进程中所有线程共享的.进程中的信号是递送到单个线程的. 线程中pthread_sigmask函数类似与进程的sigprocmask函数,可以用来阻塞信号. ...

  10. RabbitMQ Hello World

    RabbitMQ Hello World rabbitmq operation: C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.2\sbin ...