How to Prevent Garbage Collection in GIT?

后端 未结 3 617
广开言路
广开言路 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:26

    I found this answer because I was trying to prevent git from running git gc in the background, because it was messing with other operations I was trying to perform on the repo. It turns out you can specifically disable the backgrounding behaviour with

    $ git config gc.autodetach false
    

提交回复
热议问题