Make Git consume less disk space?

后端 未结 11 940
鱼传尺愫
鱼传尺愫 2020-12-24 05:19

What is the best way for git to consume less disk space?

I\'m using git-gc on my repositories (which does help, especially if there have been many commits since it w

11条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-24 05:36

    Depending on what you want to do with your repository, you might also consider using the following git clone option:

       --depth 
           Create a shallow clone with a history truncated to the specified
           number of revisions. A shallow repository has a number of
           limitations (you cannot clone or fetch from it, nor push from nor
           into it), but is adequate if you are only interested in the recent
           history of a large project with a long history, and would want to
           send in fixes as patches.
    

提交回复
热议问题