github - git trying to write a file on a push that was deleted -
i have working on repo long time , of sudden ran problem. realized had 350 meg .csv file. normal procedure push to github was:
git add . git commit -m "some message" git push
when realized starting write large file looked @ saw large .csv "shifts.csv". deleted , went
git rm shifts.csv
i rewent through process of adding, committing , pushing , still trying write large file on push after having deleted it. googling solution can't find one.
git still trying push file remote repo, because although
git rm shifts.csv git commit
removes file current , future state of source code, it still exists in repository history, in earlier commits, , therefore when push, git has push all of history remote still, including commits file in it, because it's still part of earlier history.
you have somehow erase file history of repo, if never existed @ point in time. if commit in file created isn't far in history, possibly use interactive rebase remove it, or hard reset if don't mind losing work.
however, if commit buried far in history, practical option erase file history using git filter-branch
.
Comments
Post a Comment