エラー内容
$ git push (git)-[master] Counting objects: 54, done. Delta compression using up to 4 threads. Compressing objects: 100% (53/53), done. Writing objects: 100% (54/54), 13.19 MiB | 1.58 MiB/s, done. Total 54 (delta 14), reused 0 (delta 0) remote: Resolving deltas: 100% (14/14), completed with 4 local objects. remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. remote: error: Trace: aaaaaaaaaaaaaaaaaaaa remote: error: See http://git.io/iEPt8g for more information. remote: error: File xxx.csv is 249.77 MB; this exceeds GitHub's file size limit of 100.00 MB To https://github.com/yyy/zzz.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://github.com/yyy/zzz.git'
解決法
とりあえず指示通りにドキュメントを見る。 -> Working with large files - User Documentation
このままでは csvファイルをコミットしてしまったのが残っているため、csvファイルを削除・移動してcommitし直しても push に失敗してしまう。そのため、
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch xxx.csv'
を実行して、指定したファイルのコミットした際のキャッシュを消去してしまうことで対応する。