Remove LFS from github repository

Original link: https://chegva.com/5780.html

Recently, the Github warehouse push upload times LFS excess is limited: batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.

There is a fee for this thing exceeding 1G free capacity, and it is understandable that otherwise the github warehouse can be used as a network disk. This warehouse has a size of more than 2 G. Some pdf files uploaded before are more than 50M in size, so LFS is used, and some need to be deleted. Open github Settings → Billing and plans → Plans and usage , the good guy used 2.51G, Let’s clear it up.

 1. git lfs uninstall 
  
2. git filter-branch --force --index-filter \ 
  
"git rm --cached --ignore-unmatch python/book/Python Cookbook (Second Edition) Chinese version.pdf python/book/Write high-quality code-91 suggestions for improving Python programs.pdf program/book/Head First Programming Chinese version.pdf program/book/SRE Google operation and maintenance decryption.pdf" \ 
  
--prune-empty --tag-name-filter cat -- --all 
  
3. git push -f origin master

refer to:

This article is transferred from: https://chegva.com/5780.html
This site is only for collection, and the copyright belongs to the original author.