I\'m using git, and made a small commit followed by a large one. I decided to use git rebase
to squash the two commits together before pushing them. (I\'ve ne
I just ran into this issue. Non of the answers here happened to solve this for me.
Ended up being nuget packages I added on a branch that, once switched back to master branch, seemed to not exist. Once I did a merge it would say newtonsoft...xml could not stat. I would go to the file in question and open it but Windows threw an error back saying it can't find the file (even though I was looking right at it)
How I solved this was right click delete the file (which worked but I couldnt open it because windows couldnt find it???) and try to merge again and it solved the problem.
Very strange.
Hope this helps someone later.
If the IDE you use(in case you use one) might have been getting in the way as well. That's what happened to me when using QtCreator.
if using vscode, kill terminal and open new one. else maybe close terminal too
I agree with the above "Close Visual Studio" answers.
However, an additional step I had to do even after I'd closed Visual Studio was to manually kill the "devenv.exe" Visual Studio process in Task Explorer. After I had done this I was able to again run in gitbash:
git pull
and the "cannot stat filename" error disappeared. It is perhaps due to a Visual Studio extension keeping the process open for longer even after closing.
Using SourceTree in Win 10, fixed the problem by closing Atom editor.
Error reproduce:
My encounter with this problem was caused by my editor, Intellij. As part of its internal version controls, it had gone through and locked all hidden git files. (For various reasons, I was not using the git plugin that comes with Intellij...)
So I opened a normal dos window as Administrator, changed to the directory, and executed
attrib -R /S
That removed the lock on the files and everything worked after that and I could sync my changes using the GitHub windows client.