Created
March 7, 2014 05:09
-
-
Save haijerome/9405598 to your computer and use it in GitHub Desktop.
Git Remove Large files from commit - SO thread -http://stackoverflow.com/questions/22227851/error-while-pushing-to-github-repo/22228417
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
someuser@somedomain [~/public_html/dev]# git rm var/log/system.log fatal: pathspec 'var/log/system.log' did not match any files | |
someuser@somedomain [~/public_html/dev]# git commit -m "Delete system.log file " | |
# On branch master | |
# Your branch is ahead of 'origin/master' by 6 commits. | |
# | |
# Untracked files: | |
# (use "git add <file>..." to include in what will be committed) | |
# | |
# error_log | |
# products_update_2014-03-06.csv | |
nothing added to commit but untracked files present (use "git add" to track) | |
someuser@somedomain [~/public_html/dev]# git push -u origin master | |
Counting objects: 1341, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (1143/1143), done. | |
Writing objects: 100% (1330/1330), 7.70 MiB | 1.62 MiB/s, done. | |
Total 1330 (delta 692), reused 0 (delta 0) | |
remote: warning: File var/log/system.log is 57.82 MB; this is larger than GitHub 's recommended maximum file size of 50 MB | |
remote: error: GH001: Large files detected. | |
remote: error: Trace: 065adf54bb45f5bf120304976a8517f8 | |
remote: error: See http://git.io/iEPt8g for more information. | |
remote: error: File var/report/752246136671 is 100.86 MB; this exceeds GitHub's file size limit of 100 MB | |
To git@github.com:someuser/some-repo.git | |
! [remote rejected] master -> master (pre-receive hook declined) | |
error: failed to push some refs to 'git@github.com:someuser/some-repo.git' |
THANK YOU.
git filter-branch worked for me, too.
Thank you, it works 👍
git filter-branch --index-filter 'git rm --cached --ignore-unmatch file/Directory/name.sql'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this , http://stackoverflow.com/questions/9240949/how-to-remove-a-file-permanently-in-git-without-getting-warning-ref-refs-head
git filter-branch --index-filter 'git rm --cached --ignore-unmatch file/Directory/name.sql'