Git/Garbage Collection: Unterschied zwischen den Versionen
< Git
Rkr (Diskussion | Beiträge) (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…“) |
Rkr (Diskussion | Beiträge) 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