When I use git to push code to oschina, it keeps prompting that one of the log files is too large, but I have already deleted that log file?
给我你的怀抱
给我你的怀抱 2017-05-02 09:29:14
0
3
742

1. I committed a .log file (about 140M) in the project before, and when I pushed it to git.oschina, I was prompted that the file was too large and could not be pushed. Then I used the 'delete' key on the computer keyboard to delete it. file, commit here and then push, still the same error is reported

给我你的怀抱
给我你的怀抱

reply all(3)
为情所困

Simply adding a new onecommit或者commit --amend only deletes this file from the current version. The entire process of adding this file and deleting this file is still recorded in the historical submission.
If you want to completely remove this file from the repository, you must rewrite all commits in the history where this file exists.

To rewrite history, you can use git filter-branch. For details, see the tutorial on Github. git filter-branch,具体可以看Github上的教程。
当然对于简单的情况,你也可以选择git resetgit rebaseOf course, for simple situations, you can also choose git reset plus git rebase.

Supplement:git rm file.log相当于rm file.log && git add file.log, the questioner has deleted the file and submitted it. If you don’t understand, please don’t answer randomly, okay...

为情所困

Use git rm to delete

刘奇
git rm --cached <filename> 

Then perform add commit and other operations again
You can ignore the .log file in the .gitignore file
Otherwise it would be too troublesome to delete it every time it is generated

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template