other versions
- jessie 1:2.1.4-2.1+deb8u6
- jessie-backports 1:2.11.0-3~bpo8+1
- stretch 1:2.11.0-3+deb9u4
- testing 1:2.20.1-2
- stretch-backports 1:2.20.1-1~bpo9+1
- unstable 1:2.20.1-2
- experimental 1:2.21.0+next.20190320-1
GIT-PRUNE(1) | Git Manual | GIT-PRUNE(1) |
NAME¶
git-prune - Prune all unreachable objects from the object databaseSYNOPSIS¶
git prune [-n] [-v] [--expire <expire>] [--] [<head>...]
DESCRIPTION¶
OPTIONS¶
-n, --dry-runDo not remove anything; just report what it would
remove.
-v, --verbose
Report all removed objects.
--
Do not interpret any more arguments as options.
--expire <time>
Only expire loose objects older than <time>.
<head>...
In addition to objects reachable from any of our
references, keep objects reachable from listed <head>s.
EXAMPLE¶
To prune objects not used by your repository or another that borrows from your repository via its .git/objects/info/alternates:$ git prune $(cd ../another && git rev-parse --all)
NOTES¶
In most cases, users will not need to call git prune directly, but should instead call git gc, which handles pruning along with many other housekeeping tasks. For a description of which objects are considered for pruning, see git fsck's --unreachable option.SEE ALSO¶
git-fsck(1), git-gc(1), git-reflog(1)GIT¶
Part of the git(1) suite05/28/2018 | Git 2.1.4 |