interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / Documentation / git-pack-refs.adoc

61 lines · 1700 bytes Raw Blame History
1git-pack-refs(1)
2================
3
4NAME
5----
6git-pack-refs - Pack heads and tags for efficient repository access
7
8SYNOPSIS
9--------
10[synopsis]
11git pack-refs [--all] [--no-prune] [--auto] [--include <pattern>] [--exclude <pattern>]
12
13DESCRIPTION
14-----------
15
16Traditionally, tips of branches and tags (collectively known as
17'refs') were stored one file per ref in a (sub)directory
18under `$GIT_DIR/refs`
19directory. While many branch tips tend to be updated often,
20most tags and some branch tips are never updated. When a
21repository has hundreds or thousands of tags, this
22one-file-per-ref format both wastes storage and hurts
23performance.
24
25This command is used to solve the storage and performance
26problem by storing the refs in a single file,
27`$GIT_DIR/packed-refs`. When a ref is missing from the
28traditional `$GIT_DIR/refs` directory hierarchy, it is looked
29up in this
30file and used if found.
31
32Subsequent updates to branches always create new files under
33`$GIT_DIR/refs` directory hierarchy.
34
35A recommended practice to deal with a repository with too many
36refs is to pack its refs with `--all` once, and
37occasionally run `git pack-refs`. Tags are by
38definition stationary and are not expected to change. Branch
39heads will be packed with the initial `pack-refs --all`, but
40only the currently active branch heads will become unpacked,
41and the next `pack-refs` (without `--all`) will leave them
42unpacked.
43
44
45OPTIONS
46-------
47
48include::pack-refs-options.adoc[]
49
50
51BUGS
52----
53
54Older documentation written before the packed-refs mechanism was
55introduced may still say things like ".git/refs/heads/_<branch>_ file
56exists" when it means "branch _<branch>_ exists".
57
58
59GIT
60---
61Part of the linkgit:git[1] suite