How to delete a blob from git repo

前端 未结 2 1137
南笙
南笙 2020-12-15 13:03

I accidentally added a db dump (over 1 GB) to my repo, pushed it and noticed this few days later. I used git filter-branch to delete the file, expired reflog and run git gc

2条回答
  •  余生分开走
    2020-12-15 13:12

    Can't you just do rm .git/objects/path/to/blob?

    I am not sure why git-gc didn't delete it.

提交回复
热议问题