everyday: replace 'prune' and 'repack' with 'gc'
In everyday tasks, "repack -a -d -f" won't be used, so there is not much point mentioning "repack". By showing the --prune option to "gc", we can do without mentioning "git prune", too. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Miklos Vajna committed
Dec 20, 2007 at 15:05 UTC
8a82b133547a93e8bdc08fd199c237f540eb9249
1 file changed
+6
-13
Documentation/everyday.txt
+6
-13
@@ -30,10 +30,6 @@ Everybody uses these commands to maintain git repositories.
30
31
* gitlink:git-fsck[1] to check the repository for errors.
32
33
- * gitlink:git-prune[1] to remove unused objects in the repository.
34
-
35
- * gitlink:git-repack[1] to pack loose objects for efficiency.
36
-
33
* gitlink:git-gc[1] to do common housekeeping tasks such as
34
repack and prune.
35
@@ -45,24 +41,21 @@ Check health and remove cruft.::
41
------------
42
$ git fsck <1>
43
$ git count-objects <2>
48
-$ git repack <3>
49
-$ git gc <4>
44
+$ git gc <3>
45
------------
46
+
47
<1> running without `\--full` is usually cheap and assures the
48
repository health reasonably well.
49
<2> check how many loose objects there are and how much
50
disk space is wasted by not repacking.
56
-<3> without `-a` repacks incrementally. repacking every 4-5MB
57
-of loose objects accumulation may be a good rule of thumb.
58
-<4> it is easier to use `git gc` than individual housekeeping commands
59
-such as `prune` and `repack`. This runs `repack -a -d`.
51
+<3> repacks the local repository and performs other housekeeping tasks. Running
52
+without `--prune` is a safe operation even while other ones are in progress.
53
54
Repack a small project into single pack.::
55
+
56
------------
64
-$ git repack -a -d <1>
65
-$ git prune
57
+$ git gc <1>
58
+$ git gc --prune
59
------------
60
+
61
<1> pack all the objects reachable from the refs into one pack,
@@ -189,7 +182,7 @@ $ git pull <3>
182
$ git log -p ORIG_HEAD.. arch/i386 include/asm-i386 <4>
183
$ git pull git://git.kernel.org/pub/.../jgarzik/libata-dev.git ALL <5>
184
$ git reset --hard ORIG_HEAD <6>
192
-$ git prune <7>
185
+$ git gc --prune <7>
186
$ git fetch --tags <8>
187
------------
188
+