本文介绍了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 提交dcacb1b ,,提交0898c96 (2016年1月13日),通过 Johannes Schindelin(dscho).

See commit d562102, commit dcacb1b, commit df617b5, commit 0898c96 (13 Jan 2016) by Johannes Schindelin (dscho).

许多运行"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导致“文件取消链接失败";错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 11:38