← 返回命令列表

Linux command

dolt-gc 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Run garbage collection

dolt gc

Run shallow garbage

dolt gc --shallow

说明

dolt gc performs garbage collection on the Dolt repository, removing unreachable objects and optimizing storage. This reclaims space from deleted branches, reset commits, and other orphaned data. Garbage collection consolidates the database storage, potentially reducing disk usage and improving query performance. It's particularly useful after operations that create orphaned data like branch deletions or hard resets. The shallow option performs a quicker, less thorough collection suitable for regular maintenance, while full gc provides complete cleanup.

参数

--shallow
Perform shallow (faster) garbage collection.
--help
Display help information.

FAQ

What is the dolt-gc command used for?

dolt gc performs garbage collection on the Dolt repository, removing unreachable objects and optimizing storage. This reclaims space from deleted branches, reset commits, and other orphaned data. Garbage collection consolidates the database storage, potentially reducing disk usage and improving query performance. It's particularly useful after operations that create orphaned data like branch deletions or hard resets. The shallow option performs a quicker, less thorough collection suitable for regular maintenance, while full gc provides complete cleanup.

How do I run a basic dolt-gc example?

Run `dolt gc` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --shallow do in dolt-gc?

Perform shallow (faster) garbage collection.