我正在寻找减少git存储库大小的方法.搜索引导我到git gc --aggressive大多数时间.我还读到这不是首选方法.
为什么?如果我跑步,我应该注意什么gc --aggressive?
git repack -a -d --depth=250 --window=250推荐结束gc --aggressive.为什么?如何repack减少存储库的大小?此外,我不太清楚旗帜--depth和--window.
我应该怎么选择gc和repack?什么时候应该使用gc和repack?
我正在使用MAC OS Yosemite,我想将一个17 MB的文件推送到我的github-Account。我在ssh和https上都尝试了git,但都没有用。
GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push -u origin master返回最后6行:
Counting objects: 243, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (118/118), done.
packet_write_wait: Connection to 192.30.253.113 port 22: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
在寻找解决方案时,我开始在各种配置脚本中设置TCPKeepAlive,ServerAlive,ClientAlive参数,最后以~/.ssh/config:
Host github.com
PubKeyAuthentication yes
IdentityFile ~/.ssh/id_rsa.pub
ServerAliveInterval 300
TCPKeepAlive no
#ServerAliveCountMax 2400
Run Code Online (Sandbox Code Playgroud)
在/etc/sshd_config:
# $OpenBSD: sshd_config,v 1.89 2013/02/06 00:20:42 dtucker Exp $
# This is …Run Code Online (Sandbox Code Playgroud)