我正在尝试git push --all
,它只是挂在写作对象上
10.0-final-project git:(master) ✗ git push --all
Counting objects: 134, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (129/129), done.
Writing objects: 32% (44/134), 321.56 MiB | 231.00 KiB/s
321.56 MiB和231.00 KiB / s继续上涨。
我尝试过使用git config --global http.postBuffer
和git config --global sendpack.sideband false
什么都行不通。解决此问题的方法是什么?
看起来你已经向GIT添加了一个巨大的二进制文件或文件夹。
这不是你应该用git做的事情。
如果是这种情况,请考虑以下解决方案:Git Large File Storage
Another relative article可以在这里找到一些清洁回购的示例代码。
我们需要搜索所有历史记录以找到适合删除的文件。据我所知,这是非常重要的,所以这里有一个复杂的命令,列出了超过一百万字节的所有文件修订版本的大小总和。在mac上运行它。
git rev-list master | while read rev; do git ls-tree -lr $rev | cut -c54- | grep -v '^ '; done | sort -u | perl -e '
while (<>) {
chomp;
@stuff=split("\t");
$sums{$stuff[1]} += $stuff[0];
}
print "$sums{$_} $_\n" for (keys %sums);
' | sort -rn >> large_files.txt
这是有趣的部分。如果large_files.txt仍然与以前格式相同,请执行以下操作:
git filter-branch --tree-filter 'rm -rf `cat /full/path/to/large_files.txt |
cut -d " " -f 2` ' --prune-empty <BRANCHES>
我遇到了同样的问题。但原因是当前用户没有对目标目录的写入权限。