gpt4 book ai didi

Git 桂 : Perpetually getting "This repository currently has approximately 320 loose objects."

转载 作者:IT王子 更新时间:2023-10-29 00:35:00 24 4
gpt4 key购买 nike

每次我在特定项目上启动 Git Gui 时,我都会收到此消息:

This repository currently has approximately 320 loose objects.

enter image description here

然后我继续单击,我得到了这个对话框:

enter image description here

问题是,当我再次打开 Git Gui 时,我得到完全相同的消息,又是大约 320 个松散对象!好像点击根本没有任何效果。

最佳答案

只是简单地跳过 pop 窗口,如How to skip "Loose Object" popup when running 'git gui'在接受的答案中建议忽略 Git 正在向您传达可能的性能问题这一事实。这应该可以通过从命令行运行此命令来修复:

cd path/to/your/git/repo
git gc --aggressive

来自 git help gc 的输出:

Runs a number of housekeeping tasks within the current repository, such as compressing file revisions (to reduce disk space and increase performance) and removing unreachable objects which may have been created from prior invocations of git add.

Users are encouraged to run this task on a regular basis within each repository to maintain good disk space utilization and good operating performance.

--aggressive

Usually git gc runs very quickly while providing good disk space utilization and performance. This option will cause git gc to more aggressively optimize the repository at the expense of taking much more time. The effects of this optimization are persistent, so this option only needs to be used occasionally; every few hundred changesets or so.

这应该可以防止提示 pop 一段时间。

关于Git 桂 : Perpetually getting "This repository currently has approximately 320 loose objects.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21457407/

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