Fix lỗi remote: error: GH001

TranVan@ChungDerise MINGW64 /d/github/twitterapi (master)
$ git push
Enumerating objects: 89, done.
Counting objects: 100% (89/89), done.
Delta compression using up to 4 threads
Compressing objects: 100% (82/82), done.
Writing objects: 100% (88/88), 178.04 MiB | 4.57 MiB/s, done.
Total 88 (delta 15), reused 0 (delta 0)
remote: Resolving deltas: 100% (15/15), done.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: c3f0da62d83688106124b22169e4bc89
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File research-python/classifier/model/ft.li.1701.bin is 179.95 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/chungderise/TwitterAPI.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/chungderise/TwitterAPI.git'

Lỗi là này yêu cầu xóa một số file lỗi thì mới push được. Trong lỗi trên nó yều cầu mình phải xóa File : [ research-python/classifier/model/ft.li.1701.bin ]

Chạy câu lệnh:

$ git filter-branch -f --index-filter 'git rm -r -f --ignore-unmatch <FILE_TO_REMOVE>' HEAD 

Thay phần <FILE_TO_REMOVE> bằng research-python/classifier/model/ft.li.1701.bin

$ git filter-branch -f --index-filter 'git rm -r -f --ignore-unmatch  research-python/classifier/model/ft.li.1701.bin  HEAD 

Vậy là ok

TranVan@ChungDerise MINGW64 /d/github/twitterapi (master)
$ git push
Enumerating objects: 86, done.
Counting objects: 100% (86/86), done.
Delta compression using up to 4 threads
Compressing objects: 100% (80/80), done.
Writing objects: 100% (85/85), 17.21 MiB | 1.87 MiB/s, done.
Total 85 (delta 14), reused 0 (delta 0)
remote: Resolving deltas: 100% (14/14), done.
To https://github.com/chungderise/TwitterAPI.git
   c187b1d..be0ced5  master -> master

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Design a site like this with WordPress.com
Get started