我正在寻找如何处理我的源代码(Web应用程序)所依赖的大型二进制文件的意见.我们目前正在讨论几种选择:
您对此有何体验/想法?
另外:有没有人有多个Git存储库的经验并在一个项目中管理它们?
这些文件是程序的图像,该程序生成包含这些文件的PDF.文件不会经常更改(如年份),但它们与程序非常相关.没有文件,程序将无法运行.
我有一个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 rebase --interactive在我的回购中遇到严重问题.我得到了神秘的错误fatal: ref HEAD is not a symbolic ref,我的rebase停止运作.我必须git rebase --abort回到一个良好的状态.
以下是我收到的输出:https://gist.github.com/d38f1e2d2ec9bc480b6f
我过去被告知的是,这是因为我处于"超级HEAD"模式,但如果我处于那种模式,我将如何首先进入rebase?我肯定会开始master,然后运行git rebase --interactive并修改git-rebase-todo文本文件到我想要的.然后发生这个错误.
我曾经在工作中问过每个人,有人在freenode上@git.似乎没有人真正了解我的问题或知道解决方案是什么.谷歌搜索该错误没有产生任何结果,StackOverflow上的相关搜索没有任何证据.我似乎无法弄清楚这一点,并且从压缩每一次提交到我现在推动每一个我做的每一个小改变作为它自己的单独提交真的很蹩脚.
我在存储库中有相当多的文件.因此,在变基改变期间,由于内存不足异常,git有时会崩溃.
例如
git checkout feature
git rebase master
(nasty out of memory exception)
.....
Run Code Online (Sandbox Code Playgroud)
所以一旦我得到了那个例外,我再次尝试变基
git rebase master
Run Code Online (Sandbox Code Playgroud)
它告诉我,分支feature是最新的.这看起来很奇怪,因为rebase以异常结束.
有没有办法避免异常?可能会以某种方式告诉git使用较少的内存量.此异常可能是存储库损坏的原因吗?如果它导致损坏,有没有什么方法可以安全地将在rebase期间所做的更改回滚到之前git rebase master调用的状态?