在Git中添加要跟踪的目录;错误信息;添加的大小限制? [英] Adding a Directory to be Tracked in Git; Error Message; Size Limit for Adds?

查看:160
本文介绍了在Git中添加要跟踪的目录;错误信息;添加的大小限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

复制档案&子目录到本地工作目录中......然后做了git add [sub-directory name]git console中的警告吨数:警告:在[在此处插入子目录或文件名称]中的LF将被CRLF取代。该文件的原始行将以工作目录结尾。控制台滚动浏览,因为它看起来在要跟踪的工作目录中添加文件,完成添加。当使用git status时,我得到以下结果:

Copied files & sub-directories into local working directory...then did "git add [sub-directory name]" Tons of warnings in git console: "warning: LF will be replaced by CRLF in [insert sub-directory or file name here]. The file will have its original line ending in your working directory." The console scrolls through as it seemingly adds files in the working directory to be tracked, completes add. When following this with "git status" I get the following:

error: bad index file sha1 signature
fatal: index file corrupt
fatal: git status --porcelain failed

现在我已经知道如何重置git索引( rm -f .git / index 然后 git reset ...感谢Stackoverflow),但为什么上面的错误信息出现?是否因为我试图一次添加太多文件(<600MB)...或者因为我超出了我的micro git帐户的存储限制(软限制为0.6 GB)? (仅供参考:如果我重置索引,则不再添加文件,如果我重复同样的操作,当我尝试检查状态时,会得到相同的错误。)

Now I already know how to reset the git index (rm -f .git/index then git reset...thanks to Stackoverflow), but why is the above error message cropping up? Is it because I'm trying to add too many files at once (< 600MB)...or because I'm exceeding storage limits on my micro git account (a soft limit of 0.6 GB)? (FYI: If I reset the index, the files are no longer added. If I repeat the same thing, I get the same error when I try to check the status.)

推荐答案

你有没有试过

Have you tried

git gc

这可能有帮助。

这篇关于在Git中添加要跟踪的目录;错误信息;添加的大小限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆