git-无法创建临时文件:没有这样的文件或目录-仅适用于某些文件? [英] git - unable to create temporary file: no such file or directory - only for certain files?
问题描述
在我的一个git
存储库中,我遇到了一个奇怪的问题.我无法添加某些文件. Git
状态:
I've got a strange issue here with one of my git
repositories. I cannot add certain files. Git
states:
$ git add Konstruktion/Druckteile/1x_ *
警告:在Konstruktion/Druckteile/1x_Hals.gcode中,CRLF将被LF取代.
该文件将在您的工作目录中具有其原始行结尾.
错误:无法创建临时文件:没有这样的文件或目录
错误:Konstruktion/Druckteile/1x_Nickhalter_links.STL:无法插入数据库
错误:无法索引文件Konstruktion/Druckteile/1x_Nickhalter_links.STL
致命:添加文件失败
$ git add Konstruktion/Druckteile/1x_*
warning: CRLF will be replaced by LF in Konstruktion/Druckteile/1x_Hals.gcode.
The file will have its original line endings in your working directory.
error: unable to create temporary file: No such file or directory
error: Konstruktion/Druckteile/1x_Nickhalter_links.STL: failed to insert into database
error: unable to index file Konstruktion/Druckteile/1x_Nickhalter_links.STL
fatal: adding files failed
但仅适用于该单个文件.同一目录中的所有其他文件,即使具有相似的名称(例如1x_Nickhalter_rechts.STL),也都像一个超级按钮一样工作.为什么只有这个文件?有什么特别之处?
But only for this single file. All other files in the same directory, even with similar names (e.g. 1x_Nickhalter_rechts.STL) work like a charm. Why only this file? What's special about it?
我该怎么办才能找出问题所在?
What can I do to figure out what's wrong?
嗯,仅供参考:它是git
1.8.5.2.msysgit.0,可在Windows 8.1(64位)上运行.
Ah, just for info: it's git
1.8.5.2.msysgit.0 running on Windows 8.1 (64bit).
非常感谢.
干杯, 亨德里克
推荐答案
添加文件时,我遇到了完全相同的问题.以下对我有用:
I had the exact same problem when adding files. The following did the trick for me:
git config --global core.fscache false
不知道确切为什么会工作,但希望它能为其他人工作.
Don't know exactly why it works but hopefully it can work for others.
这篇关于git-无法创建临时文件:没有这样的文件或目录-仅适用于某些文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!