git gc 清理git垃圾
https://git-scm.com/docs/git-gc
NAME
git-gc - Cleanup unnecessary files and optimize the local repository
SYNOPSIS
git gc [--aggressive] [--auto] [--quiet] [--prune=<date> | --no-prune] [--force] [--keep-largest-pack]
DESCRIPTION
Runs a number of housekeeping tasks within the current repository, such as compressing file revisions (to reduce disk space and increase performance), removing unreachable objects which may have been created from prior invocations of git add, packing refs, pruning reflog, rerere metadata or stale working trees. May also update ancillary indexes such as the commit-graph.
When common porcelain operations that create objects are run, they will check whether the repository has grown substantially since the last maintenance, and if so run git gc
automatically. See gc.auto
below for how to disable this behavior.
Running git gc
manually should only be needed when adding objects to a repository without regularly running such porcelain commands, to do a one-off repository optimization, or e.g. to clean up a suboptimal mass-import. See the "PACKFILE OPTIMIZATION" section in git-fast-import[1] for more details on the import case.
OPTIONS
- --aggressive
-
Usually git gc runs very quickly while providing good disk space utilization and performance. This option will cause git gc to more aggressively optimize the repository at the expense of taking much more time. The effects of this optimization are mostly persistent. See the "AGGRESSIVE" section below for details.
- --auto
-
With this option, git gc checks whether any housekeeping is required; if not, it exits without performing any work.
See the
gc.auto
option in the "CONFIGURATION" section below for how this heuristic works.Once housekeeping is triggered by exceeding the limits of configuration options such as
gc.auto
andgc.autoPackLimit
, all other housekeeping tasks (e.g. rerere, working trees, reflog…) will be performed as well. - --prune=<date>
-
Prune loose objects older than date (default is 2 weeks ago, overridable by the config variable
gc.pruneExpire
). --prune=now prunes loose objects regardless of their age and increases the risk of corruption if another process is writing to the repository concurrently; see "NOTES" below. --prune is on by default. - --no-prune
-
Do not prune any loose objects.
- --quiet
-
Suppress all progress reports.
- --force
-
Force
git gc
to run even if there may be anothergit gc
instance running on this repository. - --keep-largest-pack
-
All packs except the largest pack and those marked with a
.keep
files are consolidated into a single pack. When this option is used,gc.bigPackThreshold
is ignored.
原文地址:https://www.cnblogs.com/butterflybay/p/13284849.html
- 如果技术是一种生命
- ruby学习笔记(2)--类的基本使用
- 域名资讯:四声域名BHHS.com被BHHS公司收购
- ruby学习笔记(1)--初识语法
- 无法启用数据库中的 Service Broker,因为已存在启用的具有相同 ID 的 Service Broker。
- Centos7.2下针对LDAP的完整部署记录
- .NET Core 已经实现了PHP JIT,现在PHP是.NET上的一门开发语言
- 温故而知新:设计模式之适配器模式(Adapter)
- .NET Core RC2/RTM 明确了时间表
- kvm虚拟化关闭虚拟网卡virbr0的方法
- NET开发学习项目资源(2)
- Linux下selinux简单梳理
- 一段oracle中的“复杂”分组统计sql
- 通过Chocolatey软件包管理器安装.NET Core
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- tensorflow API——tf.random_uniform 使用
- go cannot find package "golang.org/x/crypto/ssh/terminal" 解决方案
- go 中的 defer 使用及其规则
- 数据结构算法操作试题(C++/Python/Go)——938 二叉搜索树的范围和
- Android Studio 代理配置了Gradle依旧连接超时
- Dart 中变量类型 var, Object, dynamic 区别
- C++ 中的static关键字使用场景
- Dart 中的生产模式和检查模式
- 使用mysqladmin工具统计mysql当前的T/QPS
- MixIn 理解
- Day14:链表中倒数第k个结点
- Flutter开发笔记——BottomNavigationBar设置未选择Item颜色
- 访问虚拟机局域网服务拒绝连接
- uninstalling vim-minimal 同时也卸载了 sudo 解决方法
- 大点干!早点散----------深入剖析缓存加速--squid(反向代理与ACL访问控制以及sarg日志)