HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

git repack — Pack unpacked objects in a Git repository. More information: <https://git-scm.com/docs/git-repack>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandgit repackcliobjectsunpackedrepositorygitpack

Problem

How to use the git repack command: Pack unpacked objects in a Git repository. More information: <https://git-scm.com/docs/git-repack>.

Solution

git repack — Pack unpacked objects in a Git repository. More information: <https://git-scm.com/docs/git-repack>.

Pack unpacked objects in the current directory:
git repack


Remove redundant objects after packing:
git repack -d


Repack all objects into a single pack:
git repack -a


Limit the repack to local objects only:
git repack -l

Code Snippets

Pack unpacked objects in the current directory

git repack

Remove redundant objects after packing

git repack -d

Repack all objects into a single pack

git repack -a

Limit the repack to local objects only

git repack -l

Context

tldr-pages: common/git repack

Revisions (0)

No revisions yet.