How to Prevent Garbage Collection in GIT?

后端 未结 3 625
广开言路
广开言路 2020-12-01 18:15

Git mysteriously runs Garbage collection \"from time to time\" and deletes and orphaned commits you have.

https://www.kernel.org/pub/software/scm/git/docs/git-gc.htm

3条回答
  •  没有蜡笔的小新
    2020-12-01 18:30

    From the very same page you just linked to:

    Some git commands may automatically run git gc; see the --auto flag below for details. If you know what you’re doing and all you want is to disable this behavior permanently without further considerations, just do:

    $ git config --global gc.auto 0
    

提交回复
热议问题