2017-04-01 155 views
2

我正在清理openshift git repo。 .git中的对象文件夹似乎很大。我可以ssh进入应用程序并执行命令删除openshift git/objects文件夹

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

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

回答

0

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和会来第一:使用多达4个线程

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

“德尔塔压缩 连接到prod-myDomain.rhcloud.com通过远程主机关闭。 。 与prod-myDomain.rhcloud.com的连接已关闭。“仍然遇到同样的问题。 –