Git · Maintenance

git prune

Deletes unreachable objects. Usually run through git gc.

Syntax
git prune

Example

Example
git prune --dry-run

More in this group

git count-objects -v git filter-repo git fsck --lost-found git gc git lfs git maintenance git reflog expire git repack

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course