Remove large commits from git

前端 未结 5 1416
再見小時候
再見小時候 2021-02-14 05:37

We\'re running a central git repository (gforge) that everyone pulls from and pushes to. Unfortunately, some inept co-workers have decided that pushing several 10-100Mb jar file

5条回答
  •  死守一世寂寞
    2021-02-14 05:42

    GForge guy here. Even thought this is primarily a git question, I'd like to offer two things:

    1. Starting in GForge 6.3, site admins can identify projects that are using too much disk, as well as old and orphaned projects. This might help you avoid full-disk situations, especially if you have lots of separate teams and projects.
    2. Implementing git hooks (SCM hooks in general) in easy to do in GForge. Site administrators can configure any number of hook commands, and project-level people can then select which hooks they want for their project. Adding a hook that prevents certain types (or sizes?) of file would be a good fit for this feature.

提交回复
热议问题