]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-pack-refs.txt
Update Swedish translation (724t0f0u).
[thirdparty/git.git] / Documentation / git-pack-refs.txt
CommitLineData
d28f7cb9
JH
1git-pack-refs(1)
2================
3
4NAME
5----
6git-pack-refs - Pack heads and tags for efficient repository access
7
8SYNOPSIS
9--------
7791a1d9 10[verse]
b1889c36 11'git pack-refs' [--all] [--no-prune]
d28f7cb9
JH
12
13DESCRIPTION
14-----------
15
16Traditionally, tips of branches and tags (collectively known as
17'refs') were stored one file per ref under `$GIT_DIR/refs`
18directory. While many branch tips tend to be updated often,
19most tags and some branch tips are never updated. When a
20repository has hundreds or thousands of tags, this
21one-file-per-ref format both wastes storage and hurts
22performance.
23
24This command is used to solve the storage and performance
25problem by stashing the refs in a single file,
26`$GIT_DIR/packed-refs`. When a ref is missing from the
27traditional `$GIT_DIR/refs` hierarchy, it is looked up in this
28file and used if found.
29
38b7ccbe 30Subsequent updates to branches always create new files under
d28f7cb9
JH
31`$GIT_DIR/refs` hierarchy.
32
af67e91c
JH
33A recommended practice to deal with a repository with too many
34refs is to pack its refs with `--all --prune` once, and
b1889c36 35occasionally run `git pack-refs \--prune`. Tags are by
af67e91c
JH
36definition stationary and are not expected to change. Branch
37heads will be packed with the initial `pack-refs --all`, but
38only the currently active branch heads will become unpacked,
38b7ccbe 39and the next `pack-refs` (without `--all`) will leave them
af67e91c
JH
40unpacked.
41
42
d28f7cb9
JH
43OPTIONS
44-------
45
3240240f 46--all::
d28f7cb9 47
af67e91c
JH
48The command by default packs all tags and refs that are already
49packed, and leaves other refs
d28f7cb9
JH
50alone. This is because branches are expected to be actively
51developed and packing their tips does not help performance.
52This option causes branch tips to be packed as well. Useful for
53a repository with many branches of historical interests.
54
3240240f 55--no-prune::
0f018bab
JH
56
57The command usually removes loose refs under `$GIT_DIR/refs`
58hierarchy after packing them. This option tells it not to.
d28f7cb9 59
d28f7cb9
JH
60GIT
61---
9e1f0a85 62Part of the linkgit:git[1] suite