How to remove old versions of media files from a git repository

后端 未结 5 454
不思量自难忘°
不思量自难忘° 2020-12-15 05:00

I have a Git repository with several huge media files (images and audio files). Several versions of these media files have been successively commited to the repo. The files

5条回答
  •  猫巷女王i
    2020-12-15 05:23

    I have a script (github gist here) to remove a selection of unwanted folders from the entire history of a git repo, or to delete all but the latest version of a folder.

    It's hard-coded to assume that all git repositories are in ~/repos, but that's easy to change. It should also be easy to adapt to work with individual files.

提交回复
热议问题