0

BFG works great for deleting files in a local repo. But I realized that a git push --force to GitHub does not cause the files to be deleted on GitHub as well.

E.g.: I've tried doing a force push, then cloning the repo from GitHub in a temp directory. The deleted files are back.

Is there some other operation I can do that will completely replace the state on GitHub? Or do I need to create a whole new repo?

torek
  • 448,244
  • 59
  • 642
  • 775
Dogweather
  • 15,512
  • 17
  • 62
  • 81
  • 3
    Assuming you did everything correctly, the workflow you describe should lead to the expected result. Something else must be wrong. Post exact steps taken (commands and output) including how you determine that files are present at the start, then not present after the operation, then present again after the clone. – j6t Aug 08 '22 at 07:18
  • 1
    Git*Hub* never drop any commits at all, for internal reasons. But if you adjust all your branch and tag names such that you can't *find* the commits that contain the large files, you won't see them in the commits that you can see. If you do need to have GitHub drop some commits for some reason, you must contact GitHub Support. – torek Aug 08 '22 at 15:25

0 Answers0