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_*
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
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?
Ah, just for info: it's git
1.8.5.2.msysgit.0 running on Windows 8.1 (64bit).
Thanks a lot.
Cheers, Hendrik
If you have "Controlled folder access" enabled in Windows 10, it might be the reason for this error.
You'd normally get a notification in the action center when such an action is blocked by Windows, similar to this:
To resolve that, press ⊞ to open the start menu, and type "Controlled folder access" or part of it and launch it.
Click "Block history" and if git is there, give it access by clicking "Allow on device" (only present if not already configured - hence absent in the screenshot):
This solved the issue for me.
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.
This worked for me:
export TMPDIR="/tmp/"
Yep, seriously. No idea what this actually did, but it worked, so I'm not exactly complaining. This might be a fix that only worked for me, because I can't reproduce the problem now that I've fixed it.
If the problem recurs when you relog, put it at the bottom of your ~/.bashrc
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With