File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -455,3 +455,27 @@ Forking repository
455
455
456
456
Forking a repository on GitHub is as simple as clicking Fork button in the right
457
457
upper corner at https://github.com/python/cpython.
458
+
459
+
460
+ Maintaining a repository
461
+ -------------------------
462
+
463
+ The Git object database and other files/directories under ``.git `` require
464
+ periodic maintenance and cleanup. For example, commit editing leaves
465
+ unreferenced objects (dangling objects, in git terminology) and these
466
+ objects should be pruned to avoid collecting cruft in the DB. The
467
+ command ``git gc `` is used for maintenance. Git automatically runs
468
+ ``git gc --auto `` as a part of some commands to do quick maintenance.
469
+ Users are recommended to run ``git gc --aggressive `` from time to
470
+ time; ``git help gc `` recommends to run it every few hundred
471
+ changesets; for CPython it should be something like once a week
472
+ (GitHub itself runs the command weekly, so new checkouts do not need to
473
+ perform this step).
474
+
475
+ ``git gc --aggressive `` not only removes dangling objects, it also
476
+ repacks object database into indexed and better optimized pack(s); it
477
+ also packs symbolic references (branches and tags).
478
+
479
+ From time to time run ``git fsck --strict `` to verify integrity of
480
+ the database. ``git fsck `` may produce a list of dangling objects;
481
+ that's not an error, just a reminder to perform regular maintenance.
You can’t perform that action at this time.
0 commit comments