Git/Garbage Collection: Unterschied zwischen den Versionen

aus www.kruedewagen.de, Homepage von Ralf und Judith Krüdewagen (Kruedewagen)
< Git
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „In order to save disk space and to improve the overall repository processing performance you should run following command from time to time (also on bare remot…“)
 
K (Rkr verschob die Seite Git/GC nach Git/Garbage Collection)
 
(kein Unterschied)

Aktuelle Version vom 14. Januar 2014, 10:04 Uhr

In order to save disk space and to improve the overall repository processing performance you should run following command from time to time (also on bare remote repositories):

git count-objects -v
git gc
git count-objects -v

This packs multiple objects into one file. If you clone a project (from remote) the server packs the files automatically, but that local copy becomes fragmented over time (and so also the remote).

As script:

DIR="/data/git/"
cd $DIR
REPOS="repo1 repo2 repo3"
for i in $REPOS; do
 cd $i
 git gc
 cd $DIR
done