Git error, need to remove large file

前端 未结 8 630
北恋
北恋 2021-02-01 05:37

I am getting this error when I try to push to git and I have no idea how to fix it.

Counting objects: 1239, done.
Delta compression using up to 4 threads.
Compre         


        
8条回答
  •  清歌不尽
    2021-02-01 06:06

    To remove large files, GitHub suggests:

    $ git rm --cached giant_file
    # Stage our giant file for removal, but leave it on disk
    
    git commit --amend -CHEAD
    # Amend the previous commit with your change
    # Simply making a new commit won't work, as you need
    # to remove the file from the unpushed history as well
    
    git push
    # Push our rewritten, smaller commit
    

    Or if you want more general information on how to work with large files on GitHub.

    And next time add /log in your .gitignore

提交回复
热议问题