1

Our repository has many frequent commits with binary files. New users clone the repo with "--depth 1" option, and the size is manageable at first. Over time, with frequent pulls, the size of the repo grows rapidly. Is there a way to clean up the local repo, so that only N last commits are remaining?

We don't want to delete those files from history in remote, just clean the history of the local repo to "--depth 1"

PS: I know, git is not designed for binary files, and we should use something like LFS, but LFS is not very stable yet.

Deep Learner
  • 449
  • 5
  • 17
  • 2
    Possible duplicate of [How to remove/delete a large file from commit history in Git repository?](http://stackoverflow.com/questions/2100907/how-to-remove-delete-a-large-file-from-commit-history-in-git-repository) – everton Jun 14 '16 at 18:43
  • Slava, once we delete .git what's the right way to re-initialize the repo from the correct commit, without cloning it? – Deep Learner Jun 14 '16 at 18:48
  • Everton, this is a diff question. I made an edit to clarify it. – Deep Learner Jun 14 '16 at 18:50

0 Answers0