Skip to content

Commit 33c8259

Browse files
committed
gc
1 parent 67b0393 commit 33c8259

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
* [reuse recorded resolution, record and reuse previous conflicts resolutions.](https://github.com/git-tips/tips#reuse-recorded-resolution-record-and-reuse-previous-conflicts-resolutions)
9494
* [Open all conflicted files in an editor.](https://github.com/git-tips/tips#open-all-conflicted-files-in-an-editor)
9595
* [Count unpacked number of objects and their disk consumption.](https://github.com/git-tips/tips#count-unpacked-number-of-objects-and-their-disk-consumption)
96+
* [Prune all unreachable objects from the object database.](https://github.com/git-tips/tips#prune-all-unreachable-objects-from-the-object-database)
9697

9798
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
9899
<!-- @doxie.inject end toc -->
@@ -641,5 +642,10 @@ git diff --name-only | uniq | xargs $EDITOR
641642
git count-objects --human-readable
642643
```
643644

645+
## Prune all unreachable objects from the object database.
646+
```sh
647+
git gc --prune=now --aggressive
648+
```
649+
644650
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
645651
<!-- @doxie.inject end -->

tips.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,4 +284,7 @@
284284
}, {
285285
"title": "Count unpacked number of objects and their disk consumption.",
286286
"tip": "git count-objects --human-readable"
287+
}, {
288+
"title": "Prune all unreachable objects from the object database.",
289+
"tip": "git gc --prune=now --aggressive"
287290
}]

0 commit comments

Comments
 (0)