From 33c82592ac3558550b7a93a1c987480b787c9891 Mon Sep 17 00:00:00 2001 From: "Hemanth.HM" Date: Tue, 29 Mar 2016 21:45:21 +0530 Subject: [PATCH] gc --- README.md | 6 ++++++ tips.json | 3 +++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 692c4ca..0ffec01 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ * [reuse recorded resolution, record and reuse previous conflicts resolutions.](https://github.com/git-tips/tips#reuse-recorded-resolution-record-and-reuse-previous-conflicts-resolutions) * [Open all conflicted files in an editor.](https://github.com/git-tips/tips#open-all-conflicted-files-in-an-editor) * [Count unpacked number of objects and their disk consumption.](https://github.com/git-tips/tips#count-unpacked-number-of-objects-and-their-disk-consumption) +* [Prune all unreachable objects from the object database.](https://github.com/git-tips/tips#prune-all-unreachable-objects-from-the-object-database) @@ -641,5 +642,10 @@ git diff --name-only | uniq | xargs $EDITOR git count-objects --human-readable ``` +## Prune all unreachable objects from the object database. +```sh +git gc --prune=now --aggressive +``` + diff --git a/tips.json b/tips.json index 5e12dcb..5f719a6 100644 --- a/tips.json +++ b/tips.json @@ -284,4 +284,7 @@ }, { "title": "Count unpacked number of objects and their disk consumption.", "tip": "git count-objects --human-readable" +}, { + "title": "Prune all unreachable objects from the object database.", + "tip": "git gc --prune=now --aggressive" }]