From 4465b830bcf78f6aa2127a8717156fa59c679d12 Mon Sep 17 00:00:00 2001 From: aetonsi <18366087+aetonsi@users.noreply.github.com> Date: Tue, 2 Jan 2024 02:37:44 +0100 Subject: [PATCH] Compact `.git` folder --- devops/git.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/devops/git.md b/devops/git.md index 4b6c796..35298cd 100644 --- a/devops/git.md +++ b/devops/git.md @@ -7,6 +7,16 @@ ## Commands +### Compact `.git` folder + +Reduces the size of the `.git` folder by cleaning up cached unuseful thingies. + +```shell +git maintenance run --auto +git gc --aggressive --prune=now +git reflog expire --expire=now --all +``` + ### `git log` with the cutest formatting ```powershell