所有命令 · evidence
pm history compact
Compact item history streams into a synthetic baseline plus retained tail entries. Pass an item id for one stream, or a bulk selector (--ids/--all-over/--closed/--all-streams) to compact many.
Compact item history streams into a synthetic baseline plus retained tail entries. Pass an item id for one stream, or a bulk selector (--ids/--all-over/--closed/--all-streams) to compact many.
用法
pm history compact [options] [id]参数
| <id> | Item id (omit when using a bulk selector) | 可选 |
|---|
选项
| --before <value> | Compact entries strictly before this version number or ISO timestamp (single-id mode only) | 可选 |
|---|---|---|
| --ids <value> | Bulk IDs: comma/newline text, - stdin, or @path file | 可选 |
| --all-over <n> | Bulk: compact every stream with more than N entries | 可选 |
| --closed | Bulk: compact only closed (terminal) items' streams | 可选 |
| --all-streams | Bulk: compact every history stream regardless of lifecycle state | 可选 |
| --min-entries <n> | Bulk: skip streams with at most N entries (already compact; default 3) | 可选 |
| --dry-run | Preview compaction impact without writing the history file | 可选 |
| --author <value> | Mutation author | 可选 |
| --message <value> | Audit history message for the compaction marker entry | 可选 |
| --force | Force ownership/lock override | 可选 |
示例
pm history compact --help