How to shrink the .git folder

后端 未结 7 2353
花落未央
花落未央 2020-12-02 04:16

My current base has a total size of approx. 200MB.

But my .git folder has an amazing size of 5GB (!). Since I push my work to an external server, i don\'t need any b

7条回答
  •  一个人的身影
    2020-12-02 04:58

    5GB vs 200MB is kind of weird. Try to run git gc.

    But no, unless you split your repository into modules, you can't decrease the size of the .git directory.

    Each clone of a git repo is a full fledged repository that can act as a server. That's the base principle of distributed version control.

提交回复
热议问题