关于github/gitee不给上传100m以上文件的错误:th

2018-04-18  本文已影响405人  ab64fd4eaee3

remote: warning: Large files detected.
remote: error: File django-oscar.zip is 115.24 MB; this exceeds file size limit of 100.0 MB
remote: error: hook declined to update refs/heads/master
To git@gitee.com:zhuozhi/oscar.git

Ubuntu

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

Windows

  1. Download the windows installer from here
  2. Run the windows installer
  3. Start a command prompt/or git for windows prompt and run git lfs install

Mac OSX

You may need to brew update to get all the new formulas
brew install git-lfs
git lfs install

RHEL/CentOS

  1. Install git >= 1.8.2

    • Recommended method for RHEL/CentOS 5 and 7 (not 6!)

      1. Install the epel repo link (For CentOS it's just sudo yum install epel-release)
      2. sudo yum install git
    • Recommended method for RHEL/CentOS 6

      1. Install the IUS Community repo. curl -s https://setup.ius.io/ | sudo bash or here
      2. sudo yum install git2u
    • You can also build git from source and install it. If you do that, you will need to either manually download the the git-lfs rpm and install it with rpm -i --nodeps git-lfs*.rpm, or just use the Other instructions. The only other advanced way to fool yum is to create and install a fake/real git rpm to satisfy the git >= 1.8.2 requirement.

  2. To install the git-lfs repo, run curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash from here

  3. sudo yum install git-lfs

  4. git lfs install

添加文件类型

mkdir large-repo
cd large-repo
git init
// 通过Git LFS添加所有zip文件
git lfs track “*.zip”

提交文件

git add my.zip
git commit -m “add zip”

确认大文件

git lfs ls-files
my.zip

参考:
https://blog.csdn.net/diandianxiyu_geek/article/details/50734335
https://github.com/git-lfs/git-lfs/wiki/Installation

上一篇 下一篇

猜你喜欢

热点阅读