1GIT-PACK-REFS(1)                  Git Manual                  GIT-PACK-REFS(1)
2
3
4

NAME

6       git-pack-refs - Pack heads and tags for efficient repository access
7

SYNOPSIS

9       git pack-refs [--all] [--no-prune]
10
11

DESCRIPTION

13       Traditionally, tips of branches and tags (collectively known as refs)
14       were stored one file per ref in a (sub)directory under $GIT_DIR/refs
15       directory. While many branch tips tend to be updated often, most tags
16       and some branch tips are never updated. When a repository has hundreds
17       or thousands of tags, this one-file-per-ref format both wastes storage
18       and hurts performance.
19
20       This command is used to solve the storage and performance problem by
21       storing the refs in a single file, $GIT_DIR/packed-refs. When a ref is
22       missing from the traditional $GIT_DIR/refs directory hierarchy, it is
23       looked up in this file and used if found.
24
25       Subsequent updates to branches always create new files under
26       $GIT_DIR/refs directory hierarchy.
27
28       A recommended practice to deal with a repository with too many refs is
29       to pack its refs with --all --prune once, and occasionally run git
30       pack-refs --prune. Tags are by definition stationary and are not
31       expected to change. Branch heads will be packed with the initial
32       pack-refs --all, but only the currently active branch heads will become
33       unpacked, and the next pack-refs (without --all) will leave them
34       unpacked.
35

OPTIONS

37       --all
38           The command by default packs all tags and refs that are already
39           packed, and leaves other refs alone. This is because branches are
40           expected to be actively developed and packing their tips does not
41           help performance. This option causes branch tips to be packed as
42           well. Useful for a repository with many branches of historical
43           interests.
44
45       --no-prune
46           The command usually removes loose refs under $GIT_DIR/refs
47           hierarchy after packing them. This option tells it not to.
48

BUGS

50       Older documentation written before the packed-refs mechanism was
51       introduced may still say things like ".git/refs/heads/<branch> file
52       exists" when it means "branch <branch> exists".
53

GIT

55       Part of the git(1) suite
56
57
58
59Git 1.8.3.1                       11/19/2018                  GIT-PACK-REFS(1)
Impressum