Setup and Config
Getting and Creating Projects
Basic Snapshotting
Branching and Merging
Sharing and Updating Projects
Inspection and Comparison
Patching
Debugging
External Systems
Server Admin
- 2.43.1 → 2.45.2 no changes
- 2.43.0
11/20/23
- 2.18.1 → 2.42.3 no changes
- 2.18.0
06/21/18
- 2.17.0 → 2.17.6 no changes
- 2.16.6
12/06/19
- 2.1.4 → 2.15.4 no changes
- 2.0.5
12/17/14
DESCRIÇÃO
Note | Na maioria dos casos, os usuários devem executar git gc, que invoca o comando git prune. Veja a seção "OBSERVAÇÕES", abaixo. |
This runs git fsck --unreachable using all the refs available in refs/
, optionally with an additional set of objects specified on the command line, and prunes all unpacked objects unreachable from any of these head objects from the object database. In addition, it prunes the unpacked objects that are also found in packs by running git prune-packed. It also removes entries from .git/shallow that are not reachable by any ref.
Note that unreachable, packed objects will remain. If this is not desired, see git-repack[1].
OPÇÕES
- -n
- --dry-run
Não remova nada; basta relatar o que removeria.
- -v
- --verbose
Relate todos os objetos que foram removidos.
- --progress
Exiba o progresso.
- --expire <tempo>
Somente expire os objetos soltos com mais de <hora>.
- --
Não interprete mais argumentos como opções.
- <head>…
Além dos objetos acessíveis a partir de qualquer uma das nossas referências, mantenha os objetos acessíveis a partir dos <cabeçalho>s listados.
EXEMPLOS
Para remover os objetos que não foram utilizados pelo seu repositório ou outro que seja emprestado do seu repositório por meio de seu .git/objects/info/alternates
:
$ git prune $(cd ../another && git rev-parse --all)
OBSERVAÇÕES
Na maioria dos casos, os usuários não precisarão chamar o comando git prune diretamente, mas devem chamar o comando git gc que lida com a remoção, juntamente com muitas outras tarefas de limpeza.
Para obter uma descrição de quais objetos são considerados para a remoção, consulte a opção --unreachable de git fsck.
GIT
Parte do conjunto git[1]