本文介绍了Win 10 + Git-无法创建文件-权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这确实不是重复的问题.我尝试了几种解决方案,例如reset head^git checkout -- <file>,...,但这不能解决我的问题.问题是我无法从git status的状态未提交的更改"中还原index.php文件,因为它引发了一个错误:

This is really not a duplicate question. I tried few solutions like reset head^ , git checkout -- <file>,... but this does not solve my problem. The problem is that I can not revert the index.php file from "Changes not staged for commit" from git status because it throws me an error:

我不明白这是怎么回事.我是管理员,控制台以管理员身份运行..我具有执行此操作的所有权限,所以我需要什么权限?到底是怎么了?最终请帮助我.

I dont understand what is wrong with that. I am an admnistrator, console runs as administrator.. I have all permissions to do this so what permission I need? What the hell is wrong? Help me please I am in the end.

推荐答案

Git错误的问题-在这种情况下,由于在其他进程中打开了被感染文件导致的权限被拒绝.解决的办法是关闭除一个控制台以外的所有应用程序,然后运行git checkout -- www/index.php,一切正常,一切正常.

The problem with Git error - permission denied in this case has been caused by the incriminated file was open in other process. The solution was to shut down all the apps except one console, then run git checkout -- www/index.php and everything works as excepted without any trouble.

这篇关于Win 10 + Git-无法创建文件-权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 15:17