我有一个300 MB的git repo.我目前检出的文件重2 MB,git repo重298 MB.这基本上是一个仅限代码的回购,重量不应超过几MB.
最有可能的是,有人在某个时候偶然犯了一些重文件(视频,巨大的图像等),然后将它们删除......但不是从git中删除,所以我们有无用大文件的历史.如何在git历史记录中追踪大文件?有400多个提交,所以一个接一个将是耗时的.
注意:我的问题不是关于如何删除文件,而是如何在第一时间找到它.
我有一个git存储库驻留在内存有限的服务器上.当我尝试从服务器克隆现有存储库时,我收到以下错误
hemi@ubuntu:$ git clone ssh://hemi@servername.dk/home/hemi/repos/articles
Initialized empty Git repository in /home/hemi/Skrivebord/articles/.git/
hemi@servername.dk's password:
remote: Counting objects: 666, done.
remote: warning: suboptimal pack - out of memory
remote: fatal: Out of memory, malloc failed
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed
hemi@ubuntu:$
Run Code Online (Sandbox Code Playgroud)
为了处理这个错误,我试图重新打包原始存储库(根据此论坛帖子).但是,它不是重新打包存储库,而是描述了如何使用"git pack-objects"命令.
hemi@servername:~/repos/articles$ git repack -a -d …Run Code Online (Sandbox Code Playgroud) 我是git的新手.我想将一个大型提交推送到远程服务器,但问题是我何时使用
git push origin master
Run Code Online (Sandbox Code Playgroud)
它返回错误
Counting objects: 5009, done.
Delta compression using up to 16 threads.
fatal: unable to create thread: Resource temporarily unavailable
error: pack-objects died with strange error
Run Code Online (Sandbox Code Playgroud)
那么无论如何我可以设置Delta Compression的最大线程使用.
感谢帮助,
袁晨
最终更新和修复:这里的解决方案结果是两件事:使用Windows Git而不是Grag Borland 建议的 Cygwin Git ,以及Git配置设置pack.threads = 1和gc.aggressiveWindow = 150.
我有一个大型的本地Git存储库,一个git svn cloneSVN存储库,大约有40,000次提交.我正试图git gc在这个存储库上运行,并且无处可去:
$ git gc --auto
Auto packing the repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.
Counting objects: 25966, done.
Compressing objects: 100% (25249/25249), done.
fatal: Out of memory, malloc failed (tried to allocate 426523986 bytes)
error: failed to run repack
Run Code Online (Sandbox Code Playgroud)
我正在使用4GB RAM的64位双核Win7机器上运行Cygwin中的Git 1.7.5.1.该.git目录目前略高于6.1GB.
我已经尝试过运行 …
我正在共享主机上托管一个git repo.我的repo必然有几个非常大的文件,每次我尝试在repo上运行"git gc"时,我的进程被共享主机提供程序杀死,因为使用了太多内存.有没有办法限制git gc可以消耗的内存量?我希望它可以交换内存使用速度,只需要花一点时间来完成它的工作.
git pull失败,出现以下错误
remote: Counting objects: 146, done.
remote: fatal: unable to create thread: Resource temporarily unavailable
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header
Run Code Online (Sandbox Code Playgroud)
任何想法如何成功拉?
我正在尝试将大型(1.4GB)Git存储库克隆到具有384MB RAM的32位Debian VM.我正在使用Git 1.7.2.5,并使用SSH协议进行克隆('git clone user@host.com:/ my/repo')
克隆因此消息失败:
remote: Counting objects: 18797, done.
remote: warning: subobtimal pack - out of memory
remote: Compressing objects: 100% (10363/10363), done.
fatal: out of memory, malloc failed (tried to allocate 905574791 bytes)
fatal: index-pack failed
Run Code Online (Sandbox Code Playgroud)
我已经尝试减少Git用于在主机存储库端重新打包并重新打包的内存量:
git config pack.windowMemory 10m
git config pack.packSizeLimit 20m
git repack -a -d
Run Code Online (Sandbox Code Playgroud)
我的问题如下:
在任何一种情况下,我能做些什么来使克隆成功吗?在线的许多潜在解决方案涉及以下部分/全部内容,在这种情况下,这些都不可接受:
提前致谢.
我克隆了一个大型仓库并出现错误(经过多次尝试)
克隆成功,但结账失败
试图解决这个问题时
git checkout -f HEAD
Run Code Online (Sandbox Code Playgroud)
一个错误回来了
致命:内存不足,realloc失败2
我已经设置了一些内存限制,因为克隆也会因设置而遇到问题
git config pack.WindowMemory 256m && git config pack.packSizelimit 256m
Run Code Online (Sandbox Code Playgroud)
根据Punit Vara(下面)的建议,我还将.git/config编辑为:
[core]
packedGitLimit = 128m
packedGitWindowSize = 128m
[pack]
deltaCacheSize = 128m
packSizeLimit = 128m
windowMemory = 128m
Run Code Online (Sandbox Code Playgroud)
我已经尝试将这些值更改为:128m,256m,512m,1024m.这不适合我.我仍然得到相同的错误,似乎出现在41%.
任何人都有这方面的经验或任何想法出错和/或可以做些什么来解决这个问题?谢谢.
我试图做一个pull或git gc时一直遇到这个错误
警告:次优打包 - 内存不足压缩对象:100%(10955/10955),完成.致命:内存不足,malloc失败(试图分配827101023字节)错误:无法运行重新打包
我该如何解决这个问题?
我最近在尝试克隆 git 存储库时收到以下错误日志:
remote: Counting objects: 4607, done.
error: git upload-pack: git-pack-objects died with error.B/s
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: fatal: Out of memory, malloc failed (tried to allocate 119483755 bytes)
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed
Run Code Online (Sandbox Code Playgroud)
经过调查,看起来错误来自 repo 服务器。我通过 ssh 连接并尝试了以下所有方法(基本上是谷歌结果的前 2 页提出的所有解决方案):
通过添加以下行来修改配置文件:
[core]
packedGitLimit = 512m
packedGitWindowSize = 512m
[pack]
windowMemory = 512m
packSizeLimit = 512m
deltaCacheSize …Run Code Online (Sandbox Code Playgroud)我正在尝试运行git clone并收到以下错误:
fatal: Out of memory, malloc failed
fatal: index-pack died with error code 128
fetch-pack from 'user@server:git' failed.
Run Code Online (Sandbox Code Playgroud)
我能够在我的本地计算机上成功完成克隆,但是当我尝试克隆到另一台服务器时,它失败了.
对于这整个git来说还是有点新鲜,所以任何帮助都会非常感激.:)