From 6c8c5e6c90f355dc56d21baf4313af6b517a77e7 Mon Sep 17 00:00:00 2001 From: "jp.av.dev" Date: Sun, 11 Jul 2021 19:29:46 -0400 Subject: [PATCH] Update 'Bare Repository' --- Bare-Repository.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Bare-Repository.md b/Bare-Repository.md index dad388c..c18b33e 100644 --- a/Bare-Repository.md +++ b/Bare-Repository.md @@ -46,3 +46,19 @@ Clona : ` git clone ssh://dominio/ruta/a/mirepo.git ` dotfls commit -m "archivo agre..." ``` +### Limpieza del repositorio +Al agregar archivos por error, y eliminarlos, estos siguen existiendo +en *.git/objects*. +Un error comun es agregar todo ` git add -A `, y en el caso de 'dotfiles' +esto implica agregar todos los archivos del *$HOME/*. +```bash +# por defecto +git gc + +# opciones +git gc [--aggressive] [--auto] [--quiet] [--prune= | --no-prune] [--force] [--keep-largest-pack] + +# ej. +git gc --prune=today +``` +doc [git gc](https://git-scm.com/docs/git-gc) \ No newline at end of file