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 stumbled upon this thread of answers - this error is such a Bogus error.# error: cannot stat 'reddit/app/views/links': Permission denied
That's all I got - when trying to merge. I read a few of the answers and then came to the realization - all I had to do was close my code editor which happens to be Atom.
Once closing the editor - I ran "git merge" again and boom , it worked.
What a pointless error:(
This happens to me in Windows occasionally
error: cannot stat 'filename': Permission denied
Most often I have multiple instance of bit bash open, and one of the git bash instances is in a directory that doesn't exist in the remote branch I'm pulling from.
Closing all but one instance of git bash solves the issue for me.
I was also on a Windows machine using Git Shell when I encountered the same error.
However, at the time I had multiple Git terminals open.
The first terminal received the error you posted about above and the other terminal had previously ran the grunt serve
terminal command from yeoman (linked below). The second terminal needed to remain open to host a local server instance.
Shutting down all terminal windows running ongoing processes can cause the error to go away.
At least that's what worked for me. After I shut down the second terminal window, I could easily checkout different branches and manipulate files.
Grunt Serve Command - Yeoman.I/O
http://yeoman.io/learning/
In my case, I had a webpack dev server running behind.
This often happens when you have preprocessing software/applications watching the project, such as Prepros or Codekit. Also, Atom and Sublime (and even Notepad++) can cause this to happen if a file in the project is currently being edited.
The easiest way around the issue is to close whatever has the project files open, merge your branches, and then re-open them to refresh it. This will also avoid any problems where the program is no longer aware of any changes that have happened, forcing you to refresh the project(s) by hand.
I got this error when my VS1013 was on a branch targeting 8.1 and I was trying to checkout a 8.0 branch. I needed to tab back to VS and allow it to UpdateAll. Then I could checkout the 8.0 branch without error.