关于github/gitee不给上传100m以上文件的错误:this exceeds GitHub's file size limit of 100.00 MB的解决方法

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 [email protected]:zhuozhi/oscar.git

Ubuntu

  • Similar to Debian 7, Ubuntu 12 and similar Wheezy versions need to have a PPA repo installed to get git >= 1.8.2

    1. sudo apt-get install software-properties-common to install add-apt-repository (or sudo apt-get install python-software-properties if you are on Ubuntu <= 12.04)
    2. sudo add-apt-repository ppa:git-core/ppa
    3. The curl script below calls apt-get update, if you aren't using it, don't forget to call apt-get update before installing git-lfs.
  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

你可能感兴趣的:(关于github/gitee不给上传100m以上文件的错误:this exceeds GitHub's file size limit of 100.00 MB的解决方法)