Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/Documentation/git-pack-refs.adoc # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / Documentation / git-pack-refs.adoc` 61 lines ยท 1700 bytes Raw Blame History 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 [synopsis] 11 git pack-refs [--all] [--no-prune] [--auto] [--include ] [--exclude ] 12 13 DESCRIPTION 14 ----------- 15 16 Traditionally, tips of branches and tags (collectively known as 17 'refs') were stored one file per ref in a (sub)directory 18 under `$GIT_DIR/refs` 19 directory. While many branch tips tend to be updated often, 20 most tags and some branch tips are never updated. When a 21 repository has hundreds or thousands of tags, this 22 one-file-per-ref format both wastes storage and hurts 23 performance. 24 25 This command is used to solve the storage and performance 26 problem by storing the refs in a single file, 27 `$GIT_DIR/packed-refs`. When a ref is missing from the 28 traditional `$GIT_DIR/refs` directory hierarchy, it is looked 29 up in this 30 file and used if found. 31 32 Subsequent updates to branches always create new files under 33 `$GIT_DIR/refs` directory hierarchy. 34 35 A recommended practice to deal with a repository with too many 36 refs is to pack its refs with `--all` once, and 37 occasionally run `git pack-refs`. Tags are by 38 definition stationary and are not expected to change. Branch 39 heads will be packed with the initial `pack-refs --all`, but 40 only the currently active branch heads will become unpacked, 41 and the next `pack-refs` (without `--all`) will leave them 42 unpacked. 43 44 45 OPTIONS 46 ------- 47 48 include::pack-refs-options.adoc[] 49 50 51 BUGS 52 ---- 53 54 Older documentation written before the packed-refs mechanism was 55 introduced may still say things like ".git/refs/heads/__ file 56 exists" when it means "branch __ exists". 57 58 59 GIT 60 --- 61 Part of the linkgit:git[1] suite