gpt4 book ai didi

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

转载 作者:IT王子 更新时间:2023-10-29 01:03:57 26 4
gpt4 key购买 nike

我一直在阅读有关 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com