3 ms·
For several months now I've been wondering how to get rid of a 700 MB data file that was accidentally committed to our shared git repo. Now everyone has it, and
by saboot 7y ago
For several months now I've been wondering how to get rid of a 700 MB data file that was accidentally committed to our shared git repo. Now everyone has it, and a clean pull takes forever. Appreciate any thoughts.
- Trisell 7y agoYou should be able to run a command that cleans the git tree of the file in all commits. I’ve had to do it because of committed passwords in files. https://stackoverflow.com/questions/35115585/remove-file-from-all-commits https://stackoverflow.com/questions/35115585/remove-file-fro...
- karmakaze 7y agoWhen using `git filter-branch` it's much faster (up to 100x) to use the `--index-filter` option rather than `--tree-filter` as it only updates the git history and not the working directory. Docs and examples at https://git-scm.com/docs/git-filter-branch https://git-scm.com/docs/git-filter-branch
- james_s_tayler 7y agoLike others comment it's possible to scrub it from the repo entirely but this will change every commit hash (I'm guessing back to the commit where the file first appeared). It's probably something you need to coordinate carefully among all the teams. Have no open branches, scrub it, force push that then people can resume work.