0

Without thinking, I managed to commit a bunch of massive audio files in a github commit. I only copped this about 7 commits later, when it was time to push.

I quickly rm --cache'd the audio files, and added them to gitignore - but since they were added around 7 commits earlier, hitting git push means git is still trying to package and send these 3-4gb of files up, which is resulting in the push failing.

Is there any way to prevent these files from being sent at all, without reverting back 7 commits to when I initially started tracking them?

Eoghan
  • 1,720
  • 2
  • 17
  • 35
  • This is what `filter-branch` is for. You might be able to interactively-rebase them out – D. Ben Knoble Dec 23 '19 at 00:53
  • https://stackoverflow.com/search?q=%5Bgit%5D+remove+large+file+history – phd Dec 23 '19 at 00:58
  • Sorry, to be clearer - it's around 3-4GB worth of *small* files. Around 10mb or so each. Running a catch-all "kill everything bigger than 100mb" doesn't do anything for me here. Everything's residing under one folder, I'm just trying to kill that folder in particular for the last 7~ commits. – Eoghan Dec 23 '19 at 01:04
  • Thanks @phd - running the BFG Repo tool on the given folder killed it off safely. I can push and merge again! – Eoghan Dec 23 '19 at 01:18

0 Answers0