git pull导致“文件取消链接失败";错误 [英] git pull causing "unlink of file failed" error

查看:95
本文介绍了git pull导致“文件取消链接失败";错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行git pull,并且遇到了可怕的文件xxx的取消链接失败"错误.

I'm trying to do a git pull and am running into the dreaded "unlink of file xxx failed" error.

我已经尝试过答案中定义的ProcessExplorer;使用find函数不会使用该文件返回任何进程.

I've tried ProcessExplorer as defined in this answer; using the find function doesn't return any process using the file in question.

我也尝试过运行git gc,如答案中所述,它可以运行,但是我仍然可以错误.

I've also tried running git gc as mentioned in this answer, and it runs, but I still get the error.

我对相关文件具有写权限.

I have write permissions to the file in question.

还有其他建议吗?这是一个主要问题.

Any other suggestions? This is causing a major problem.

推荐答案

应该在Git 2.8(2016年3月)中修复

That should be fixed in Git 2.8 (March 2016)

请参见提交d562102 提交df617b5 提交0898c96 (2016年1月13日),通过 Johannes Schindelin(dscho).
(由 Junio C Hamano-gitster-

See commit d562102, commit dcacb1b, commit df617b5, commit 0898c96 (13 Jan 2016) by Johannes Schindelin (dscho).
(Merged by Junio C Hamano -- gitster -- in commit 3c80940, 26 Jan 2016)

fetch:在垃圾回收之前释放打包文件

在进行自动gc操作之前,我们需要确保已释放打包文件,以防它们需要重新打包和垃圾回收.

fetch: release pack files before garbage-collecting

Before auto-gc'ing, we need to make sure that the pack files are released in case they need to be repacked and garbage-collected.

许多运行"gc --auto"的代码路径在退出映射的保留的packfile并使文件描述符保持打开状态之前,这对于无法删除已打开文件的系统来说是不友好的.
他们现在关闭包装.

Many codepaths that run "gc --auto" before exiting kept packfiles mapped and left the file descriptors to them open, which was not friendly to systems that cannot remove files that are open.
They now close the packs before doing so.

该问题解决了 git-for-widows问题500 .

That fixes git-for-widows issue 500.

查看测试以验证该新方法也许您可以(因为Git 2.8尚未发布)人为地提高gc.autoPackLimit.

Looking at the test used to validate that new approach, maybe you can (since Git 2.8 is not yet out) raise artificially gc.autoPackLimit.

git config gc.autoPackLimit 10000
git fetch
git config gc.autoPackLimit 50 # default value

这篇关于git pull导致“文件取消链接失败";错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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