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

git prune — Git command for pruning all unreachable objects from the object database. This command is often not

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandallclipruningforgitgit prune

Problem

How to use the git prune command: Git command for pruning all unreachable objects from the object database. This command is often not used directly but as an internal command that is used by Git gc. More information: <https://git-scm.com/docs/git-prune>.

Solution

git prune — Git command for pruning all unreachable objects from the object database. This command is often not used directly but as an internal command that is used by Git gc. More information: <https://git-scm.com/docs/git-prune>.

Report what would be removed by Git prune without removing it:
git prune {{[-n|--dry-run]}}


Prune unreachable objects and display what has been pruned to stdout:
git prune {{[-v|--verbose]}}


Prune unreachable objects while showing progress:
git prune --progress

Code Snippets

Report what would be removed by Git prune without removing it

git prune {{[-n|--dry-run]}}

Prune unreachable objects and display what has been pruned to `stdout`

git prune {{[-v|--verbose]}}

Prune unreachable objects while showing progress

git prune --progress

Context

tldr-pages: common/git prune

Revisions (0)

No revisions yet.