git - 删除 openshift git/objects 文件夹

标签 git openshift

我正在尝试清理 openshift git 存储库。 .git 中的对象文件夹似乎很大。我可以通过 ssh 进入应用程序并执行命令

git reflog expire --expire=now --all
git gc --prune=now --aggressive

服务器在执行命令时重新启动,连接断开。对于应小于 100 MB 的应用程序,对象文件夹的总大小超过 3 GB。 请指教。谢谢。

最佳答案

git gc alone can increase the size of your repo .

我更喜欢:

git gc
git repack -Ad      # kills in-pack garbage
git prune           # kills loose garbage

reflog part can be used to remove unreferenced elements并且会排在第一位:

git reflog expire --expire-unreachable=now --all
git gc --prune=now

关于git - 删除 openshift git/objects 文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43152402/

相关文章:

android - Git错误403推送

git - 无法从工作目录中删除文件

java - Openshift - 找不到适用于 jdbc 的驱动程序 :mysql

c# - 连接到 OpenShift 服务

node.js - Openshift 3 应用程序部署失败 : Took longer than 600 seconds to become ready

Git:如何显示远程添加的所有网址

ruby-on-rails - 卡皮斯特 pull 诺 + Git : repository local to production server

git - 如何使用 hg convert 将 git 分支导入到 mercurial 中?

php - openshift Mysql ip的rhc命令

在 openshift 中运行时 python websocket 失败