Skip to content

Commit 8a82b13

Browse files
Miklos Vajnagitster
authored andcommitted
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>
1 parent feb7f38 commit 8a82b13

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

Documentation/everyday.txt

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ Everybody uses these commands to maintain git repositories.
3030

3131
* gitlink:git-fsck[1] to check the repository for errors.
3232

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-
3733
* gitlink:git-gc[1] to do common housekeeping tasks such as
3834
repack and prune.
3935

@@ -45,24 +41,21 @@ Check health and remove cruft.::
4541
------------
4642
$ git fsck <1>
4743
$ git count-objects <2>
48-
$ git repack <3>
49-
$ git gc <4>
44+
$ git gc <3>
5045
------------
5146
+
5247
<1> running without `\--full` is usually cheap and assures the
5348
repository health reasonably well.
5449
<2> check how many loose objects there are and how much
5550
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.
6053

6154
Repack a small project into single pack.::
6255
+
6356
------------
64-
$ git repack -a -d <1>
65-
$ git prune
57+
$ git gc <1>
58+
$ git gc --prune
6659
------------
6760
+
6861
<1> pack all the objects reachable from the refs into one pack,
@@ -189,7 +182,7 @@ $ git pull <3>
189182
$ git log -p ORIG_HEAD.. arch/i386 include/asm-i386 <4>
190183
$ git pull git://git.kernel.org/pub/.../jgarzik/libata-dev.git ALL <5>
191184
$ git reset --hard ORIG_HEAD <6>
192-
$ git prune <7>
185+
$ git gc --prune <7>
193186
$ git fetch --tags <8>
194187
------------
195188
+

0 commit comments

Comments
 (0)