@matheusbsbs / matheus-bagliano / commits / d28f7cb935
Fork 0

Document git-pack-refs and link it to git(7).

Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Nov 6, 2006 at 00:28 UTC d28f7cb93537554e069667602a7624952e06df50
2 files changed +60
Documentation/git-pack-refs.txt new
+54
@@ -0,0 +1,54 @@
1 +git-pack-refs(1)
2 +================
3 +
4 +NAME
5 +----
6 +git-pack-refs - Pack heads and tags for efficient repository access
7 +
8 +SYNOPSIS
9 +--------
10 +'git-pack-refs' [--all] [--prune]
11 +
12 +DESCRIPTION
13 +-----------
14 +
15 +Traditionally, tips of branches and tags (collectively known as
16 +'refs') were stored one file per ref under `$GIT_DIR/refs`
17 +directory. While many branch tips tend to be updated often,
18 +most tags and some branch tips are never updated. When a
19 +repository has hundreds or thousands of tags, this
20 +one-file-per-ref format both wastes storage and hurts
21 +performance.
22 +
23 +This command is used to solve the storage and performance
24 +problem by stashing the refs in a single file,
25 +`$GIT_DIR/packed-refs`. When a ref is missing from the
26 +traditional `$GIT_DIR/refs` hierarchy, it is looked up in this
27 +file and used if found.
28 +
29 +Subsequent updates to branches always creates new file under
30 +`$GIT_DIR/refs` hierarchy.
31 +
32 +OPTIONS
33 +-------
34 +
35 +\--all::
36 +
37 +The command by default packs all tags and leaves branch tips
38 +alone. This is because branches are expected to be actively
39 +developed and packing their tips does not help performance.
40 +This option causes branch tips to be packed as well. Useful for
41 +a repository with many branches of historical interests.
42 +
43 +\--prune::
44 +
45 +After packing the refs, remove loose refs under `$GIT_DIR/refs`
46 +hierarchy. This should probably become default.
47 +
48 +Author
49 +------
50 +Written by Linus Torvalds <torvalds@osdl.org>
51 +
52 +GIT
53 +---
54 +Part of the gitlink:git[7] suite
Documentation/git.txt
+6
@@ -141,6 +141,9 @@ gitlink:git-merge[1]::
141 gitlink:git-mv[1]::
142 Move or rename a file, a directory, or a symlink.
143
144 +gitlink:git-pack-refs[1]::
145 + Pack heads and tags for efficient repository access.
146 +
147 gitlink:git-pull[1]::
148 Fetch from and merge with a remote repository or a local branch.
149
@@ -424,6 +427,9 @@ gitlink:git-rev-list[1]::
427 gitlink:git-show-index[1]::
428 Displays contents of a pack idx file.
429
430 +gitlink:git-show-ref[1]::
431 + List references in a local repository.
432 +
433 gitlink:git-tar-tree[1]::
434 Creates a tar archive of the files in the named tree object.
435