git - git gc 是否以确定的时间间隔执行?

标签 git garbage-collection

我一直在阅读有关 git 的资料,但我有一个非常特殊的问题,我很难回答。

什么时候 git gc 会自动执行?

我从各种论坛的小道消息中了解到,它默认发生在推送或获取/pull 时 - 但我找不到任何来源来验证这一点。连the documentation itself只得到这个特定的(强调我的):

Some git commands may automatically run git gc; see the --auto flag below for details

--auto标志指定

Some git commands run git gc --auto after performing operations that could create many loose objects.

我希望能够确定地说:

“在运行以下命令之一之前,git 不会清除松散的树和 blob 文件:{这里是神秘列表}。运行这些命令之一时,如果数量松散的对象超过gc.auto的值,git会自动将对象压缩成packfile。

最佳答案

目前有:

可以通过执行 code search 来验证实际列表.

此外,您还可以看到接收时的 gc 可以使用 receive.autogc 禁用,其他人只是在最后运行 gc。

关于git - git gc 是否以确定的时间间隔执行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40025328/

相关文章:

c++ - C++中增量垃圾收集模拟的内存分配

git - Hg-git 停止为多个分支工作

git - 在提交消息中链接到 GitHub 上的问题编号

java - 由于 freeMemory() 仅报告长期存在的对象,如何跟踪 Java 中的任何对象创建?

sql-server - 如何强制文件流垃圾收集器以最高优先级完成其工作?

Android Espresso - java.lang.OutOfMemoryError : GC overhead limit exceeded

git - 编辑 git 子模块

git - 如何撤消 git pull 并保留未提交的更改

git - 尝试推送到 Git 存储库时出现 403 错误

c - 在多个线程中独立运行 Boehm GC