git - 在 GUI ($git gui) 中单击存储库/压缩数据库时执行的 git 命令到底是什么

标签 git user-interface compression

我想知道在 GUI ($git gui) 中单击“存储库/压缩数据库”时到底执行的 git 命令是什么 有人可以写出这个菜单选项中执行的内容吗? enter image description here

最佳答案

我检查了sources ,这就是它的作用:

${NS}::button $w.buttons.gc -text [mc "Compress Database"] \
  34                 -default normal \
  35                 -command "destroy $w;do_gc"

// < snip >

proc do_gc {} {
  72         set w [console::new {gc} [mc "Compressing the object database"]]
  73         console::chain $w {
  74                 {exec git pack-refs --prune}
  75                 {exec git reflog expire --all}
  76                 {exec git repack -a -d -l}
  77                 {exec git rerere gc}

所以有趣的部分(git 命令)是:

git pack-refs --prune
git reflog expire --all
git repack -a -d -l
git rerere gc

这里的文档:
git pack-refs
git reflog
git repack
git rerere

关于git - 在 GUI ($git gui) 中单击存储库/压缩数据库时执行的 git 命令到底是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70412724/

相关文章:

git - 您如何查看哪个提交从 repo 协议(protocol)中删除了文件?

html - 通过 git post-receive 将 styles.less 替换为 styles.css

ruby-on-rails - 无法将应用程序部署到 heroku

git - 如何将我的十个提交从 master 移动到 git 中的一个新分支?

android - 具有褪色边缘的背景图像

c - 如何在 2013 zlib API 接口(interface)中模仿(被黑)1998 uncompress() 上的 "use_crc"标志?

java - requestFocusInWindow(boolean) 在 JComponent 中具有 protected 访问权限?

ios - 我可以为 iPhone 和 iPad 提供两个单独的应用程序吗?

android - 如何在 Android 中压缩音频和图像文件?

c - 从 C 中具有多个 NULL '\0' 的函数返回字符串